Leetcode 1124. Longest Well-Performing Interval
Convert days to +1 (hours>8) and -1 (hours<=8) and find the longest contiguous subarray whose sum is >0. This reduces to finding the farthest pair of prefix sums with a positive difference, solvable in O(n) using prefix-sum techniques (monotonic stack or hashmap).
Asked at:
Chewy
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Mid July, 2026
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.