Number of Islands
Number of Islands is the most frequently asked graph problem in industry interviews. It establishes the core pattern of connected-components counting on a grid, which generalizes to dozens of 2D BFS/DFS problems.
Enable JavaScript for the full StreamPrep guide.