Topological Sort Problems
25 Topological Sort problems on LeetCode, a Graphs interview pattern, ranked by importance (how often it comes up in real interviews). Difficulty (ELO) and importance shown per problem.
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Course Schedule | Medium | 1414 | 92 | |
| 2 | Course Schedule II | Medium | 1503 | 90 | |
| 3 | Alien DictionaryPREMIUM | Hard | 1842 | 88 | BFS Shortest Path (Unweighted) · Frequency Counting / Hash Map Lookup |
| 4 | Minimum Height Trees | Medium | 1748 | 82 | BFS Shortest Path (Unweighted) |
| 5 | Build a Matrix With Conditions | Hard | 1961 | 82 | Matrix Traversal (Diagonal, Valid Sudoku, etc) |
MORE GRAPHS PATTERNS
// your mastery





What's your Topological Sort tier?
leaps.gg syncs your LeetCode history, scores your Topological Sort mastery, and recommends exactly which problems to do next with spaced repetition. Free to start.
GET MY MASTERY MAP →