Number of Islands
Graphs · DFS · BFS · Matrix · greeting
Rapid fire modeInterviewLearn
00:00End interview
Number of Islandsm × n binary grid▶1▶1▶0▶0▶1▶0▶0▶0▶1▶1 = land0 = water4-neighbors▶
Owl: Before we write any code, tell me how you would approach this. What does an island mean to you in terms of graph traversal?
You: —