Mental Model
We use a stack to keep track of bars in increasing height order to find the largest rectangle efficiently.
Analogy: Imagine stacking books by height on a shelf. When a shorter book comes, you remove taller books to find the biggest flat space you can make between them.
Histogram bars: height array [2] [1] [5] [6] [2] [3] Stack stores indices of bars with increasing heights -> helps find max rectangle.
