Online Stock Span
Medium
Stack (Advanced)
For each day's price print the span: the number of consecutive days (including today) up to today with a price less than or equal to today's price.
Constraints
1 <= n <= 10^5 1 <= price <= 10^5
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.