DSA sheet

Grouped by pattern, in the order worth learning them. Each problem opens on LeetCode. Tick it when you can solve it again from scratch, not when you have seen the answer.

0/43

Arrays & Hashing

0/5

Counting, grouping and lookups in O(1): the base of most other patterns.

Two Pointers

0/4

Sorted input or pairs from both ends, without extra space.

Sliding Window

0/4

Best sub-array or substring under a constraint, in one pass.

Linked List

0/4

Pointer manipulation and the classic LRU design question.

Trees

0/4

Recursion, BFS and DFS: one of the most asked categories in coding rounds.

Heap / Priority Queue

0/3

Top-K, streaming medians and scheduling.

Graphs

0/5

BFS, DFS, topological sort and shortest paths.

Dynamic Programming

0/7

Write the recurrence first, then memoize, then tabulate. Practise saying the state out loud.

Intervals

0/2

Sort by start, then merge or count overlaps.

Tries

0/1

Prefix search, the core of autocomplete (see the Typeahead HLD).