2

Advent of Functional PHP: Day 9

 2 years ago
source link: https://www.garfieldtech.com/blog/aoc2021-day9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Advent of Functional PHP: Day 9

Submitted by Larry on 23 December 2021 - 11:21am

Day 9 of this year's Advent of Code revolves around grid interpretation. Specifically, we are given a grid of numbers and want to find the low points, that is, the numbers that are smaller than any of their orthogonal neighbors. (We're told to ignore diagonals in part 1.)

After finding the low points, we need to do a bit of math on each one, and add them up. As usual, this last step is mostly just to produce a single verification number at the end. That part is easy as usual, but how do we find the low points?

Continue reading this post on PeakD.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK