Goal-based paths · 15 steps

Interview preparation

The patterns that coding interviews keep returning to, in an order where each one reuses the last, with solved problems to practise every step.

Who it is for
Developers preparing for technical interviews who already know basic arrays, loops and Big O.
By the end
You can recognise the common patterns from a problem statement, explain a brute force and an improvement, and state and justify the complexity.
  1. Step 1: Talk about complexity

    Interviewers ask for the cost of every solution. These exercises cover the loop shapes that the patterns produce.

  2. Step 2: Hashing

    The most common first improvement over a brute force: remember what you have seen.

  3. Step 3: Two pointers

    The O(1)-space alternative to hashing on sorted or symmetric input.

  4. Step 4: Sliding window

    Combines two pointers with a hash map for contiguous-range questions.

  5. Step 5: Prefix sums

    Handles the range-sum questions that sliding windows cannot (negative values, counting).

  6. Step 7: Stacks

    Matching, nesting and "next greater" questions all reduce to a stack.

  7. Step 8: One-pass scans

    Several classic questions need only a running best or candidate; spotting that avoids over-engineering.

  8. Step 9: Tree and graph traversal

    BFS and DFS are expected knowledge; the visualizer makes both orders concrete.

  9. Step 10: Heaps

    Top-K and merging sorted streams are standard follow-up questions.

  10. Step 11: Intervals and greedy choices

    Scheduling questions test whether you can justify a greedy rule rather than guess it.

  11. Step 12: Dynamic programming

    Start with one-dimensional states; most interview DP problems are variations on these.

  12. Step 13: Dependencies and connectivity

    Course schedules and connected groups are the usual graph questions beyond plain traversal.

  13. Step 14: Bit tricks

    Short questions that check you know XOR and masks; cheap to learn, common as warm-ups.

  14. Step 15: Combine and review

    The final module practises reading constraints to choose a pattern, which is the real interview skill.