Study Notes

DSA · A field guide

Problem editorials

Not a solutions dump. Each entry starts where you start — a problem statement and no idea which tool to reach for — and walks the whole distance to working Java, stopping at every place the reasoning could have gone wrong.

18 editorials·7 categories·5h 30m of reading·0 read

18 of 18 shown
01

Stacks & Monotonic Order

Problems where the thing you saw most recently is the thing you need next. The stack is almost never the interesting decision — what you choose to put on it is.

03
02

Sliding Window

A window moves one step and almost nothing changes. These are won by tracking the difference — what left, what entered — instead of recomputing the whole.

02
03

Hashing & Frequency

Counting as a first-class step. Once you hold the totals, the question usually stops being about the sequence and turns into arithmetic on the counts.

02
04

Heaps & Ordering

When you need the top of an order without paying to sort everything — and when the real algorithm turns out to live inside the comparator.

01
05

Halving works on far more than a sorted array looking for a target. What it really needs is one yes/no question whose answer flips exactly once — and the hard part is finding that question.

04
06

Bit Manipulation

A small vocabulary, not a bag of tricks. Read the low bit, drop it, cancel with XOR, delete the lowest one — every classic bit problem is a sentence built from those words.

03
07

Arrays & Invariants

Problems that look like they want a simulation. Each one is really asking for a property the operations cannot change — find it and the answer is a single pass, or arithmetic.

03