Advanced graphs
Go beyond plain traversal with ordering, weights or constraints: topological sort, shortest paths with Dijkstra, and minimum spanning trees. The tell is prerequisites, costs or distances, as in Course Schedule and Network Delay Time. It handles dependencies and weighted routes.
14 problems · 1 with a video · 3 to practice in an AI round
| # | Problem | Difficulty | Video | AI round |
|---|---|---|---|---|
| 1 | Course Schedule | Medium | AI round | |
| 2 | Course Schedule II | Medium | — | |
| 3 | Cheapest Flights Within K Stops | Medium | — | AI round |
| 4 | Evaluate Division | Medium | — | |
| 5 | Longest Increasing Path in a Matrix | Hard | — | AI round |
| 6 | Minimum Height Trees | Medium | — | |
| 7 | Network Delay Time | Medium | — | |
| 8 | Path With Minimum Effort | Medium | — | |
| 9 | Reconstruct Itinerary | Hard | — | |
| 10 | Alien Dictionary | Hard | — | |
| 11 | Find All Possible Recipes from Given Supplies | Medium | — | |
| 12 | Number of Islands II | Hard | — | |
| 13 | The Maze II | Medium | — | |
| 14 | Make Lexicographically Smallest Array by Swapping Elements | Medium | — |
Sort by what interviews ask
Sign in to see how many companies ask each problem, sort all 500 by it or by likes, and tick off what you solve.
Practice in an AI round
Three of these are AI rounds: 30 minutes, an AI agent beside your code, then a scored report.
Practice Course Schedule in an AI roundYour first AI round is free.