Grokking Graph Algorithms for Coding Interviews
Graph traversal, shortest paths, topological ordering, union find and the problems that hide a graph inside a grid or a list of dependencies. Recognising the graph is usually harder than traversing it.
Course
Interview Prep
Design Gurus
2 to 3 weeks
Intermediate
Subscription
What it covers
Representations and traversal first, then the algorithms that get asked: breadth first and depth first search, topological sort, Dijkstra, union find and cycle detection, plus minimum spanning trees. Each one is tied to the interview questions it answers rather than presented in the abstract.
The real skill
Very few interview questions announce themselves as graph problems. They arrive as a grid of islands, a list of course prerequisites, a set of accounts to merge or a word ladder. The work this course does is training you to see the graph in a prompt that never uses the word.
How to use it
After each algorithm, go and find three problems that do not mention graphs and solve them with it. The translation step is the part that transfers to an interview.
Best for: candidates comfortable with trees who find graph questions land differently.
Ready to start?
Opens on Design Gurus in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Every session is free; a few slots open each week.
Follow along
New writing, resources and project ideas land here first.