hours[i] is the number of hours someone worked on day i. A day is tiring if they worked strictly more than 8 hours. A contiguous interval of days is well-performing if it has strictly more tiring days than non-tiring days.
Return the length of the longest well-performing interval, or 0 if there is none.
- Score each day
+1 if tiring and -1 otherwise, then look for the longest subarray with a positive sum - A positive sum is not an exact target, so the plain "look up
prefix - k" lookup needs a small twist - Target O(n) time