Skip to content
DSAPrep

    ↑↓ to move · Enter to open · Esc to close

    Patterns

    Interview problems repeat a small set of ideas. Learn each pattern's signals and template, then practice it — the order below is a sensible study path.

    1. 01

      Arrays & Hashing

      Trade memory for speed: remember what you have seen in a hash map or set.

      0 / 19 done

    2. 02

      Two Pointers

      Two indices walk the data from both ends (or at two speeds) to prune pairs.

      0 / 9 done

    3. 03

      Sliding Window

      Grow a window to the right, shrink from the left while it is invalid.

      0 / 12 done

    4. 04

      Stack

      Last-in-first-out: match brackets, evaluate expressions, find the next greater element.

      0 / 8 done

    5. 05

      Binary Search

      Halve the search space each step: on sorted data or on a monotonic answer.

      0 / 13 done

    6. 06

      Linked List

      Pointer surgery: dummy heads, fast/slow pointers, in-place reversal.

      0 / 11 done

    7. 07

      Trees

      Recursion that combines answers from the left and right subtrees.

      0 / 18 done

    8. 08

      Tries

      A prefix tree: each edge is a character, so shared prefixes are stored once.

      0 / 3 done

    9. 09

      Heap / Priority Queue

      Always get the smallest (or largest) item in O(log n).

      0 / 8 done

    10. 10

      Backtracking

      Build candidates one choice at a time, undo the choice, try the next.

      0 / 10 done

    11. 11

      Graphs

      Model entities as nodes and relations as edges; explore with BFS or DFS.

      0 / 14 done

    12. 12

      Advanced Graphs

      Weighted shortest paths, minimum spanning trees, and Eulerian paths.

      0 / 6 done

    13. 13

      1-D DP

      The answer for i depends on a few earlier answers: memoize or tabulate.

      0 / 15 done

    14. 14

      2-D DP

      Two indices (two strings, a grid, or item and capacity) define the state.

      0 / 12 done

    15. 15

      Greedy

      Take the locally best choice and prove it never hurts.

      0 / 12 done

    16. 16

      Intervals

      Sort by start (or end), then sweep while tracking the current interval.

      0 / 6 done

    17. 17

      Math & Geometry

      Matrix rotation, spiral order, number tricks, and fast exponentiation.

      0 / 15 done

    18. 18

      Strings

      Character counting, palindromes, and parsing.

      0 / 6 done

    19. 19

      Bit Manipulation

      Use XOR, masks, and shifts to work with bits directly.

      0 / 8 done