Showing Posts From

Deque

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.

Queue & Stack: LIFO, FIFO & Monotonic Tricks

Queue & Stack: LIFO, FIFO & Monotonic Tricks

Week 4 notes on two structures defined by how they restrict you: stacks (LIFO) and queues (FIFO), plus the monotonic stack that finally made 'next greater' problems easy.