Preparing for coding interviews

You can write functions and loops, and you want to solve unseen algorithm problems out loud under time pressure.

By the end: Read a problem’s constraints, pick a pattern for a reason, implement it, test it, and explain the cost.

0 of 41 steps done≈ 5 h of lessons
Start: Read the contract before choosing a pattern →

A lesson counts as done once you mark it Practicing or Mastered at the top of the lesson. A guided session counts once you tick it off on its own page. Labs are part of the order but are not counted.

  1. 1.Read the problem before the pattern

    1. Complexity explorerLab / practiceEvery later lesson states its cost in this language.
    2. Read the contract before choosing a patternGuided sessionState what a valid answer is and which complexity classes fit the input.
    3. ArrayFoundation≈ 10 minDSA
    4. StringFoundation≈ 10 minDSA
    5. Hash MapFoundation≈ 5 minDSAThe most common way to turn O(n²) into O(n).
    6. Hash SetFoundation≈ 5 minDSA
  2. 2.Search, pointers and windows

    1. Binary SearchFoundation≈ 5 minDSA
    2. Two Pointers (Opposite Ends)Foundation≈ 10 minDSA
    3. Two Pointers (Same Direction)Foundation≈ 10 minDSA
    4. Sliding Window (Fixed Size)Foundation≈ 10 minDSA
    5. Sliding Window (Variable Size)Foundation≈ 10 minDSA
    6. Prefix SumFoundation≈ 10 minDSA
    7. Make boundaries and progress explicitGuided sessionExplain the invariant that makes a search or window safe to shrink.
  3. 3.Choose the state that makes operations cheap

    1. Linked ListFoundation≈ 10 minDSA
    2. Fast & Slow PointersFoundation≈ 10 minDSA
    3. StackFoundation≈ 5 minDSA
    4. Monotonic StackFoundation≈ 5 minDSA
    5. QueueFoundation≈ 5 minDSA
    6. Priority QueueIntermediate≈ 10 minDSA
    7. Binary TreeIntermediate≈ 10 minDSA
    8. Binary Search TreeIntermediate≈ 10 minDSA
    9. Choose the state that makes operations cheapGuided sessionConnect required operations to a stack, heap, map or linked structure.
  4. 4.Graphs: connectivity and ordering

    1. Adjacency ListIntermediate≈ 10 minDSA
    2. Breadth-First Search (BFS)Intermediate≈ 5 minDSA
    3. Depth-First Search (DFS)Intermediate≈ 5 minDSA
    4. Topological SortIntermediate≈ 10 minDSA
    5. Union-Find (Disjoint Set Union)Advanced≈ 10 minDSA
    6. Dijkstra's AlgorithmIntermediate≈ 10 minDSA
    7. Model connectivity and orderingGuided sessionChoose traversal or topological ordering from the question rather than its vocabulary.
  5. 5.Recursion, greedy and dynamic programming

    1. Recursion & BacktrackingIntermediate≈ 10 minDSA
    2. Subsets (Power Set)Intermediate≈ 5 minDSA
    3. PermutationsIntermediate≈ 5 minDSA
    4. Greedy AlgorithmsIntermediate≈ 5 minDSA
    5. Merge IntervalsIntermediate≈ 5 minDSA
    6. Dynamic ProgrammingAdvanced≈ 10 minDSA
    7. Memoization (Top-Down DP)Advanced≈ 5 minDSA
    8. Tabulation (Bottom-Up DP)Advanced≈ 5 minDSA
    9. Coin ChangeAdvanced≈ 5 minDSA
    10. Longest Increasing SubsequenceAdvanced≈ 10 minDSA
    11. Derive a recurrence instead of recalling codeGuided sessionDefine a state, transition, base case and evaluation order.
  6. 6.Put it together

    1. TrieAdvanced≈ 10 minDSA
    2. What pattern is this? quizLab / practiceRecognising the pattern is half the interview.
    3. Explain, test and handle a follow-upGuided sessionKeep your reasoning coherent when time is limited and requirements change.
    4. Mixed mock interviewLab / practice