Data structures and algorithms, by pattern
Fourteen patterns that between them solve most interview problems. Every problem here is written from scratch, and every solution is code that ran against its tests before it reached the page.
Start here
Arrays and prefix thinking
Binary search and the predicate framework
Two pointers and sliding windows
Sorting, comparators and intervals
Hashing and search structures
Lists, stacks, queues and design
Recursion and backtracking
Heaps
Trees and BSTs
Tries and strings
Dynamic programming
- What DP actually is
- Linear DP
- The roofline run
- The hive scale
- Teeth on the wheels
- Zigzag border
- Crossing the pontoons
- The clean round bonus
- Starting the ridge relay
- Loudest run on the board
- Posts on an even grade
- The fly cue sheet
- Terrace climbs
- One struck reading
- Tints in the stair window
- Booking the soundstages
- Pitches round the market ring
- The jukebox slip
- The blurred count card
- Copper at the weighbridge
- The clearing day