Frequently Asked Graph Interview Questions and Answers

  1. Breadth First Traversal for a Graph
  2. Depth First Traversal for a Graph
  3. Kahn’s Algorithm for Topological Sorting
  4. Detect Cycle in a Graph
  5. Count the number of nodes at given level in a tree using BFS
  6. Detect cycle in a direct graph using colors
  7. Detect Cycle in a Directed Graph
  8. Detect Cycle in  an Undirected Graph
  9. Minimum cost to connect all cities
  10. Dijkstra’s shortest path algorithm
  11. Strongly Connected Components
  12. Transitive closure of a graph
  13. Find the number of islands
  14. Length of shortest chain to reach the target word
  15. Print all paths from a given source to destination
  16. Find minimum cost to reach the destination using the train
  17. Travelling Salesman Problem
  18. Optimal read list for a given number of days
  19. Print all jumping numbers smaller than or equal to a given value
  20. Minimum Time to rot all oranges
  21. Construct binary palindrome by repeated appending and trimming
  22. Find same contents in a list of contacts
  23. Check whether a given graph is Bipartite or not
  24. Euler Circuit in a Directed Graph