The reframing is the entire problem, and most people miss it. The answer splits into two independent
pieces: banked — every minute where grumpy[i] == 0,
satisfied no matter what you do — plus the best rescue, the most grumpy
customers a fixed window of minutes width can cover. Compute the banked total once, up
front; it is a constant. Then slide a frame of fixed width over the array and maintain one running
sum that counts only the grumpy minutes inside it. Two numbers, tracked separately —
seeing them as separate is the insight, because the window is not maximising total customers, it is
maximising the delta the secret technique buys you.
grumpy == 1 sum. answer = banked + best.