Algorithms

The problem-solving patterns behind coding interviews, explained out loud.

  1. 7 challenges

    Big-O Basics

    Reason about time and space costs: growth rates, loops, recursion and amortised analysis.

  2. 9 challenges

    Arrays & Hashing

    Trade memory for speed: use hash maps and sets to turn nested loops into single passes.

  3. 8 challenges

    Two Pointers

    Walk inward or alongside with two indexes to avoid comparing every pair.

  4. 8 challenges

    Sliding Window

    Keep a running window over a sequence, growing and shrinking it instead of recomputing from scratch.

  5. 8 challenges

    Stack

    Last in, first out: match pairs, undo steps and find the next bigger value.

  6. 9 challenges

    Linked Lists

    Rewire next pointers in place, and use fast and slow pointers to find cycles and midpoints.

  7. 9 challenges

    Binary Search

    Halve the search space each step, on sorted data or on the answer itself.

  8. 8 challenges

    Sorting

    How the classic sorts work, what they cost, and when sorting is the key to a problem.

  9. 10 challenges

    Trees

    Recursion and traversal on binary trees: depth, levels and ordering rules.

  10. 6 challenges

    Tries

    Store words letter by letter in a prefix tree to answer prefix and dictionary queries fast.

  11. 7 challenges

    Heaps & Priority Queues

    Keep the smallest or largest item ready in logarithmic time, for top-k, merging and scheduling.

  12. 10 challenges

    Graphs

    Explore grids and networks with depth- and breadth-first search, and order tasks with dependencies.

  13. 8 challenges

    Backtracking

    Build answers step by step, undo choices that fail, and prune branches that can't succeed.

  14. 8 challenges

    Greedy

    Make the locally best choice at each step, and be able to argue why it never hurts.

  15. 7 challenges

    Intervals

    Sort ranges by start or end, then sweep once to merge, count or compare overlaps.

  16. 8 challenges

    Bit Manipulation

    Use AND, OR, XOR and shifts to solve counting and searching problems in constant space.

  17. 10 challenges

    Dynamic Programming

    Break a problem into overlapping subproblems and reuse their answers instead of recomputing them.