Concept Flow - Stock Span Problem Using Stack
Start with empty stack
For each day's price
While stack not empty and top price <= current price
Pop stack
Calculate span: current index - top of stack index
Push current day index onto stack
Repeat for all days
Return span array
We process each day's price, popping from stack all days with prices less or equal, then calculate span using stack top, and push current day.
