Problem 739 · Medium

Daily Temperatures

Use a decreasing monotonic stack of indices to resolve the next warmer day in linear time.

Open the interactive visualisation