Graph Theory: Easy to Hard Problems
Easy
- Number of Islands (Counts the number of islands in a grid)
- Valid Sudoku (Validates a Sudoku board)
- Flood Fill (Fills connected regions with a new color)
- Graph Valid Tree (Checks if a given graph forms a valid tree)
- Shortest Path in Binary Matrix (Finds the shortest path in a binary matrix from top-left to bottom-right)
Medium
- Course Schedule (Determines if all courses can be finished given prerequisites)
- Minimum Height Trees (Finds the roots of trees with the minimum height)
- Network Delay Time (Finds the time it takes for all nodes to receive a signal from a source node)
- Topological Sort (Finds a valid ordering of courses given prerequisites)
- Critical Connections in a Network (Finds all critical connections in a network graph)
Hard
- Reconstruct Itinerary (Reconstructs an itinerary from a list of tickets)
- Shortest Path in a Grid with Obstacles Elimination (Finds the shortest path in a grid with obstacles and allowed eliminations)
- Graph Bipartiteness (Checks if a graph is bipartite)
- Find the Weakly Connected Component in the Graph (Finds the weakly connected component in a directed graph)
- Networkx Maximum Flow Problem (Finds the maximum flow in a flow network)