Daily Temperatures — Monotonic Stack

For each day in a load forecast, count how many days pass before a strictly higher peak arrives, or flag that none does.

Monotonic Stack · Medium

More in Monotonic Stack

All algorithm problems