Graphs interview questions
4 questions on this data structure, most asked first. Reported by candidates in public interview write-ups and reworded by Scrivio. How the reports are counted
Your progress: 0 of 4 done, 0 saved
Count the islands of connected 1s in a binary grid.
Reported 54 times
Read the solutionGraph traversalExample 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 solutionGraph traversalExample 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 solutionGraph traversalExample sources
3 of the write-ups counted: geeksforgeeks.org 2026, geeksforgeeks.org 2020, geeksforgeeks.org 2020
Given modules and their dependencies, find an order in which they can be executed.
Reported 17 times
Read the solutionGraph algorithmsExample sources
3 of the write-ups counted: geeksforgeeks.org 2024, geeksforgeeks.org 2017, geeksforgeeks.org 2019