Medium · Graphs

Number of Islands

A grid of "1" for land and "0" for water. Count the islands — groups of land joined up, down, left or right.

grid = [["1","1","0"],
        ["1","0","0"],
        ["0","0","1"]]

→ 2
Record your take

No one has solved it yet.