Graph traversal interview questions
Breadth-first and depth-first search, islands, components, cycles.
3 questions solved with this pattern, most asked first. Reported by candidates in public interview write-ups and reworded by Scrivio. How the reports are counted
Your progress: 0 of 3 done, 0 saved
Count the islands of connected 1s in a binary grid.
Reported 54 times
Read the solutionGraphsExample sources
3 of the write-ups counted: geeksforgeeks.org 2023, geeksforgeeks.org 2022, geeksforgeeks.org 2017
Determine whether an undirected graph contains a cycle.
Reported 43 times
Read the solutionGraphsExample sources
3 of the write-ups counted: geeksforgeeks.org 2019, geeksforgeeks.org 2024, geeksforgeeks.org 2022
Compare breadth-first search with depth-first search.
Reported 20 times
Read the solutionGraphsExample sources
3 of the write-ups counted: geeksforgeeks.org 2026, geeksforgeeks.org 2020, geeksforgeeks.org 2020