| Problem statement | Source code | Tags: BFS/DFS
The low points are those that are lower than all of their adjacent points (up, down, left, right). Just iterate through all points and check their neighbors.
A canonical flood fill problem. I use DFS here. For each low point, I start a DFS that visits all neighbors with height less than 9. The size of the basin is the number of points visited in this DFS.