@@ -150,7 +150,7 @@ The trick here is the boundary behavior -- trying to read off the edge of the bo

The result: x,y coordinates are now largely irrelevant and we can just traverse every square without worrying about boundary conditions.

The check of each square against its neighbors is very simple and there is probably a more elegant way of writing it, especially in Part B where significant code duplication creeps in.

The check of each square against its neighbors is naively written and there is probably a more elegant way of doing it, especially in Part B where significant code duplication creeps in.

## Part B

Same as above, but when I find a low point I kick off a recursive flood-fill there and track how many squares I filled (see `basinsize`). Once the basin size is known, I store it in the minimum index of a 3-long ascended-sorted array, and re-sort that array to ensure the least of these top-3 values winds up in the minimum index again ripe for replacement. At the end of traversal I multiply together the top three values to get the answer.