Graph and heap problems are where coding interviews stop looking like array puzzles. The data is a web of connections, such as packages that depend on packages, tiles on a game map, or services that call other services, or it’s a stream where only the top few items matter. That’s also where AI-written code tends to go quietly wrong.
An assistant can produce a breadth-first search in seconds. Someone still has to notice when it forgets where it’s been, drains its queue with shift() on a graph with fifty thousand nodes, or sorts a million log lines to find the ten slowest. That someone is you.
In this course, you’ll practice two patterns that go together more often than you’d think:
- Graphs and grids, where you store neighbors in a
Map, keep aSetof what you’ve visited, and choose between a depth-first walk and a level-by-level one depending on whether the question is about reaching something or about distance - Heaps, which keep the smallest or largest item ready at the top. JavaScript has no built-in heap, so you’ll build a small
MinHeapclass yourself and then use it to pick the top k items and merge sorted streams
Every problem is set in a realistic web-app scenario, from npm dependency graphs and circular imports to a paint-bucket tool, trending hashtags, and merged server logs, and it runs in your browser on Node 26.
Your first goal is a working solution. Then a bonus test plays the interviewer’s follow-up and checks whether your solution still holds up at scale.
Along the way, you’ll review an AI-written function that finds the shortest chain between two people, test your pattern spotting in a quiz, and finish with a mock interview scored on communication, problem solving, code quality, and testing.
What’s Included:
- 20 Lessons
- Video Subtitles and Full Transcripts
- Translated Subtitles in 8 Languages
- 2 Downloadable Resources
- Interactive Quiz to Check Your Progress
- 11 Hands-On Coding Exercises
- Q&A With JavaScript Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths: