Find the Number of Islands
Prereq: BFS on Graph
Given a 2-dimensional matrix of values with
1, count the number of
1. An island consists of all value
1 cells and is surrounded by either an edge or all
0 cells. A cell can only be adjacent to each other horizontally or vertically, not diagonally.