Graph

Connected Components / BFS/ DFS

1.Maximum number of edges to be removed to contain exactly K connected components in the Graphchevron-right2. Social Networking Graphchevron-right3.The Flight Planchevron-right6.Longest path in an undirected treechevron-right7.Keys and Roomschevron-right9.Number of Islandschevron-right10. Number of Provinceschevron-right11.Surrounded Regionschevron-right12. All Paths From Source to Targetchevron-right13.Word Ladderchevron-right14.Rotting Orangeschevron-right19. 01 Matrixchevron-right22.Word Searchchevron-right23. Minimum Time to Collect All Apples in a Treechevron-right24. Time Needed to Inform All Employeeschevron-right25. As Far from Land as Possiblechevron-right26. Clone Graphchevron-right29. Number of Operations to Make Network Connectedchevron-right30. Open the Lockchevron-right31. Word Search IIchevron-right33. Knight On Chess Boardchevron-right34. Shortest Bridgechevron-right35. Pacific Atlantic Water Flowchevron-right36. Making A Large Islandchevron-right

Cycle Detection

4.Is it a tree?chevron-right15.Course Schedulechevron-right

Bipartite Graphs

5.Possible Bipartitionchevron-right8.Is Graph Bipartite?chevron-right

MST

27. Min Cost to Connect All Pointschevron-right

Directed Graph Indegree

17. Minimum Number of Vertices to Reach All Nodeschevron-right

Shortest Distances

18.Network Delay Timechevron-right20. Cheapest Flights Within K Stopschevron-right28. Find the City With the Smallest Number of Neighbors at a Threshold Distancechevron-right32. Number of Ways to Arrive at Destinationchevron-right37. Path with Maximum Probabilitychevron-right

Strongly Connected Components

21. Critical Connections in a Networkchevron-right

Topological Sort

16.Course Schedule IIchevron-right

Graph Algorithms

Graph Algorithmschevron-right

Last updated