LeetCode 200: Number Of Islands — Step-by-Step Visual Trace
Medium — Graph | Depth-First Search | Matrix | Connected Components
The Problem
Given a 2D grid map of '1's (land) and '0's (water), count the number of islands where an island is surrounded by water and formed by connecting adjacent lands horizontal...
blog.tracelit.dev2 min read