Skip to content

Code challenge

Number of Islands

Problem

Given a 2D grid of '1' (land) and '0' (water), count the islands. An island is land connected horizontally/vertically.
Editor · javascript4 lines · 50 chars
Back to topic
Number of Islands — Graphs (BFS, DFS) · Aevrofy