Topological Sort
This technique is used for finding a linear ordering of elements that have dependencies on each other.
How to Identify
- Data Structure Involves: Graph, Array, HashTable, Queue
- Question Type: Scheduling or grouping problems which have dependencies (directed edges) between items.
Example
Course Schedule
Coming Soon ...
Related Problems
Problems | Difficulty | |
---|---|---|
1 | Course Schedule | Medium |
2 | Course Schedule II | Medium |
3 | Sort Items by Groups Respecting Dependencies | Hard |
4 | Alien Dictionary (Leetcode Premium) | Hard |