Fundamentals
/
Matrix as Graph
⏸
00:00
↻
← Prev
Next →
▶
Question
Given a 2D grid of 0s (water) and 1s (land), return the number of islands (connected components of 1s using 4-directional adjacency).
▶
Understand
▶
Approach
▶
My Code
▶
Reference Solution
Compare
8