Showing Posts From
Patterns
- 15 Dec, 2025
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.
- 08 Dec, 2025
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.
- 01 Dec, 2025
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.
- 25 Jul, 2025
Two Pointers Algorithm - Intuition & Patterns
Week 0 notes on the two pointers technique: the 'squeeze' idea that kills a lot of nested loops, the two movement styles, and when to actually use it.
- 23 Jul, 2025
Sliding Window Algorithm - Fixed & Variable Length
Week 0 notes on the sliding window: when to use it, fixed vs variable windows, and how it turns a lot of subarray and substring problems from O(n^2) into O(n).