Fundamentals/Matrix as Graph
← PrevNext →
Given a 2D grid of 0s (water) and 1s (land), return the number of islands (connected components of 1s using 4-directional adjacency).