Showing 1 question
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#1. Number of Islands