Advanced Linked List, Stack & Queue

Advanced Linked List, Stack & Queue

Week 21 notes: the harder linear-structure problems, where the trick is usually combining two structures. Reversing in k-groups, monotonic deques for sliding-window max, and the LRU cache.

Hashing & Prefix Sum Patterns

Hashing & Prefix Sum Patterns

Week 20 notes: prefix sums plus a hash map is one of the combos I use most. O(1) range queries, counting subarrays with a target sum in one pass, 2-D prefix sums, and the difference array.

Two Pointers & Sliding Window (Advanced)

Two Pointers & Sliding Window (Advanced)

Week 19 notes: Phase 2 kicks off by pushing the two most reused array patterns to medium/hard. Variable windows with a shrink rule, the at-most/exactly counting trick, and multi-pointer partitioning.

Phase 1 Revision & Buffer

Phase 1 Revision & Buffer

Week 18 is a breather. A topic-by-topic recap of Phase 1, a keyword-to-pattern cheat sheet, and the spaced-repetition plan I use for the problems that didn't stick.

Backtracking: An Intro

Backtracking: An Intro

Week 17 notes: backtracking explores every candidate by building it up step by step and undoing dead ends. The choose/explore/un-choose template, and why pruning is everything.