Topological sort with indegrees [mp]
Micro pattern¶
Description¶
Process zero-indegree vertices and decrement incoming-dependency counts for their successors.
Problems¶
- 207. Course Schedule (Top Hard)
- 210. Course Schedule II (Top Hard)
- 329. Longest Increasing Path in a Matrix (Top Hard)
- 1203. Sort Items by Groups Respecting Dependencies (Graph Theory)
- 1857. Largest Color Value in a Directed Graph (Graph Theory)