Vibe Engines
YouTube
LEARNING PATH · Foundations

Crack the Coding Interview

For the algorithms half of the loop.

Beginner ~3h11 lessons11 steps

Follow the DSA roadmap, play the patterns as interactive games, then prove you can implement them by solving the matching challenges in your browser.

  • Recognize the core DSA patterns under interview questions
  • Trace graph, search and sort algorithms with confidence
  • Implement and test solutions under time pressure
0 / 11 done · 0%
  1. RoadmapNext up

    Data Structures & Algorithms Roadmap

    The map: what to learn and in what order.

  2. Challenge

    Fizz Buzz

    A warm-up to get the engine under your fingers.

  3. Algorithm

    Binary Search: The Vault

    The most-tested pattern, played.

  4. Challenge

    Two Sum

    Hash-map thinking, solved in your browser.

  5. Algorithm

    BFS: The Flood

    Breadth-first search on a grid.

  6. Algorithm

    Build Order: DFS & Topological Sort

    DFS, cycles and build order.

  7. Algorithm

    Six Degrees: Union-Find

    Connectivity in near-constant time.

  8. Algorithm

    Dijkstra: The Last Mile

    Weighted shortest paths.

  9. Algorithm

    Quicksort: The Pivot Pit

    Partitioning and the worst case.

  10. Algorithm

    Merge Sort: The Cascade

    The O(n log n) guarantee.

  11. Challenge

    Valid Parentheses

    The canonical stack problem.

How this path works

This path is for engineers preparing for the coding rounds of a software interview: new grads facing a first technical screen, career switchers who can build apps but have not solved timed puzzles, and experienced developers who have not touched a graph algorithm in years. You only need to write loops and functions in Python or TypeScript.

A typical coding round gives you 30 to 45 minutes for one or two problems. Interviewers watch whether you clarify the input before typing, name a brute force and then improve it, handle edge cases such as empty input, duplicates or a missing target, and state the time and space complexity without guessing. Most questions are a familiar pattern in disguise, so recognizing the pattern quickly matters more than having seen the exact problem.

The steps run from map to warm-up to patterns. The roadmap shows where everything sits, Fizz Buzz gets you used to the in-browser editor and its hidden tests, and binary search and Two Sum cover the two most common ways to beat a brute force: halving a sorted range and remembering what you have seen in a hash map. The graph run then builds on itself, from breadth-first search to depth-first search and build orders, union-find for connectivity, and Dijkstra once edges carry weights. Quicksort and merge sort reuse that recursive thinking, and Valid Parentheses closes the path as a stack problem to finish against the clock.

What each step gives you

  1. Data Structures & Algorithms Roadmap

    Eighteen stations on three ladders, from Big-O, arrays and hashing through stacks, trees and heaps to BFS, shortest paths and dynamic programming, each with a Build it task and a checkpoint question. Use it to see which patterns this path covers and which ones, such as two pointers, sliding windows and dynamic programming, you will need to practice outside it.

  2. Fizz Buzz

    The classic screening question: return the list for 1 to n, testing divisibility by both 3 and 5 before either alone, or the FizzBuzz case never fires. Its real job here is mechanical, getting you comfortable with the editor, the Run shortcut and the hidden tests, so that the first problem that matters is not also your first time using the tool.

  3. Binary Search: The Vault

    You crack a vault of sorted dials by guessing, then watch the Halver find any value in O(log n) looks by keeping a low and high window and discarding the half that cannot hold the target. The Solve it exercise asks for binary_search(arr, target) against hidden tests, the base for first-occurrence, search-insert-position and binary-search-on-the-answer questions.

  4. Two Sum

    Find the two indices that add up to a target in one pass by storing each value's index in a hash map and checking whether target minus the current number has already been seen. It is the template for the trade-memory-for-time move behind Contains Duplicate, Group Anagrams and Subarray Sum Equals K, and the classic place to state the O(n²) brute force out loud before improving it.

  5. BFS: The Flood

    Breadth-first search played as a flood spreading through a maze in rings: a FIFO queue, a visited set, and the guarantee that the first time you reach a cell is the shortest path on an unweighted grid. The runnable Python and TypeScript version is your template for Number of Islands, Rotting Oranges, Word Ladder and any shortest-path question where every step costs the same.

  6. Build Order: DFS & Topological Sort

    You schedule eight dependent tasks by hand, then watch depth-first search finish nodes bottom-up and reverse that order into a valid build order, with a back edge exposing any cycle. It covers Course Schedule and alien-dictionary style questions, and its comparison with Kahn's in-degree algorithm gives you a second approach for when the interviewer asks for one.

  7. Six Degrees: Union-Find

    Union-find keeps items in groups through a parent array and answers whether two items are connected in near-constant time, once union by rank and path compression keep the trees flat. The Solve it task, counting connected groups from a list of edges, is the core of Number of Provinces, Redundant Connection and the cycle check inside Kruskal's minimum spanning tree.

  8. Dijkstra: The Last Mile

    Dijkstra played as a courier crossing a city: a min-priority queue pops the cheapest known corner, relaxes its streets and locks each distance for good, which only works because no street costs less than zero. Expect it on Network Delay Time and cheapest-route questions, along with the follow-ups on why one negative edge breaks it and what the O((V + E) log V) bound assumes.

  9. Quicksort: The Pivot Pit

    Watch Lomuto partitioning drop each pivot into its final position, then pick your own pivots and push the sort into its O(n²) worst case on already sorted input. Interviewers use it for Kth Largest Element through quickselect, for in-place partition questions such as Sort Colors, and for the classic follow-up on why randomizing the pivot matters.

  10. Merge Sort: The Cascade

    Merge sort played as a cascade of sorted runs doubling in size, which shows why it is O(n log n) on every input, stable, and paid for with an O(n) buffer. The merge step alone answers Merge Two Sorted Lists and Merge Sorted Array, and the same divide-and-conquer recursion is how you count inversions or sort a linked list.

  11. Valid Parentheses

    Decide whether a string of brackets is balanced and correctly nested by pushing each opener onto a stack and checking each closer against the top, with a closing-to-opening map making the match one lookup. Treat it as this path's final timed check: aim to finish in about ten minutes, then try Min Stack and Daily Temperatures, which use the same last-in, first-out idea.

A study plan

  1. Week 1

    Skim the DSA roadmap, then do Fizz Buzz, The Vault and Two Sum. For every problem, say the brute force and its complexity aloud before you write the better version. End the week by solving Two Sum and the binary search exercise again from a blank editor, without hints, in under fifteen minutes each.

  2. Week 2

    Play The Flood, Build Order and Six Degrees on separate days. After each one, close the page and write the algorithm from memory: the BFS queue, the DFS colors, find and union with path compression. Then solve two outside problems per pattern, such as Number of Islands for BFS and Course Schedule for topological sort.

  3. Week 3

    Finish with The Last Mile, The Pivot Pit and The Cascade, then Valid Parentheses on a timer. Run two mock rounds of one unseen problem in 30 minutes each, explaining as you type and stating the complexity at the end. Go back to whichever pattern took you longest to recognize.

  4. Every day

    Keep a short log of each problem you solve: its name, the pattern it used, and the mistake you made. Reading that log back once a week is what turns separate solutions into recognition, and it tells you exactly which pattern to drill next.

Questions about this path

How many LeetCode problems should I solve before a coding interview?

There is no magic number. Curated lists of 75 to 150 problems are popular because coverage across patterns matters more than volume, and 400 problems solved at random can teach less than 100 studied by pattern. A practical test: pick an unseen medium problem, and if you can name the approach within five minutes and finish working code within thirty, you are close. This path gives you the core patterns; outside problems supply the repetitions, ideally two or three per pattern.

How long does it take to prepare for a coding interview?

If you code every day but are rusty on algorithms, four to eight weeks of an hour or two a day is a common range. Starting from scratch on data structures, plan for two to three months, because recursion and graphs take a while to feel natural. Working through this path once takes a few evenings; most of the time goes into repetition, re-solving problems from memory, timing yourself and explaining your reasoning aloud until it is automatic.

Which programming language should I use in a coding interview?

Use the language you write most fluently, as long as the company allows it. Python is popular because lists, dictionaries, sets, deque and heapq cover most interview needs in very little code. TypeScript or JavaScript works too if it is your daily language, though you will write more by hand, since JavaScript has no built-in heap. Every runnable exercise in this path accepts both Python and TypeScript, so you can practice in the one you plan to use.

What are the most common coding interview patterns?

The patterns that recur most are hashing, two pointers and sliding windows, binary search, stacks, BFS and DFS on grids and graphs, topological sort, union-find, heaps, tree traversal and dynamic programming. This path covers hashing, binary search, stacks, BFS, DFS with topological sort, union-find, Dijkstra and the two classic sorts. For two pointers, sliding windows and dynamic programming, The 4-Week Interview Sprint path has a runnable lesson on each, so the two paths fit together.

Is it OK to look at the solution when I am stuck on a problem?

Yes, if you do it deliberately. Give the problem an honest 20 to 30 minutes, then read one hint rather than the whole solution, and reveal the answer only once you have a specific question about it. After reading a solution, close it and write it yourself from memory, then solve it again a few days later. Every challenge in this path has hints and a Reveal solution button for that reason, but a problem only counts as learned once you can redo it cold.

Practising the patterns, not memorising

Coding interviews sample a handful of recurring patterns — hashing, binary search, stacks, graph traversal, shortest paths, sorting — under time pressure. This path builds intuition for them the way that actually sticks: playable algorithm games where you drive the problem and lose on instinct, then runnable challenges where you implement the fix with hidden tests.

The goal is recognition speed: seeing a new problem and knowing which pattern it wants, then writing it cleanly. That transfers well beyond interviews — it's the same instinct that makes real algorithmic work fast.

← All learning paths