Topological Sort
12 problems
Topological sort produces a linear ordering of a DAG where each node comes before its descendants. Two algorithms: DFS (post-order reversal) and BFS Kahn's (process nodes with in-degree 0). Applications: course scheduling, build dependency resolution, and task ordering.
- 210.Course Schedule IIMedium
- 310.Minimum Height TreesUnknown
- 329.Longest Increasing Path in a MatrixHard
- 802.Find Eventual Safe StatesMedium
- 851.Loud and RichMedium
- 1462.Course Schedule IVMedium
- 1857.Largest Color Value in a Directed GraphHard
- 1976.Number of Ways to Arrive at DestinationMedium
- 2115.Find All Possible Recipes from Given SuppliesUnknown
- 2127.Maximum Employees to Be Invited to a MeetingUnknown
- 2192.All Ancestors of a Node in a Directed Acyclic GraphMedium
- 2392.Build a Matrix With ConditionsHard