Problem 1124 · Medium

Longest Well-Performing Interval

Find the longest interval whose tiring days outnumber the other days. A running score and the first position of each score show the best window.

Open the interactive visualisation