Count Lakes
Given a 2D grid representing a map of land and water cells, count the number of distinct lakes (connected regions of water cells). A lake is defined as a group of horizontally or vertically adjacent water cells.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late May, 2026
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.