Showing Posts From

Monotonic stack

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.