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 from stack
If stack empty -> span = current day index + 1
Else span = current day index - top index on stack
Push current day index onto stack
Move to next day
Repeat until all days processed
Return span array
The flow shows how for each day's price, we pop smaller or equal prices from stack to find the span, then push current day index.
