Number of Islands
Graphs · DFS · BFS · Matrix · greeting
Learn mode
00:00End interview
Number of Islandsm × n binary grid1100100011 = land0 = water4-neighbors
Owl: Hi. Number of Islands. 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: