Solution: Grumpy Bookstore Owner
C# solution for the Grumpy Bookstore Owner problem using the Sliding Window pattern.
We'll cover the following...
Statement
You are given two integer arrays customers and grumpy, each of length n, and an integer minutes. At minute i, customers[i] customers enter the bookstore. If grumpy[i] == 1, the owner is grumpy during that minute and none of those customers are satisfied. If grumpy[i] == 0, the owner is not grumpy and all customers from that minute are satisfied.
The owner can use a special technique exactly once to stay not grumpy for a consecutive block of minutes minutes. During that chosen block, all customers are satisfied regardless of the values in grumpy.
Return the maximum total number of satisfied customers that can be achieved.
Constraints:
n == customers.length == grumpy.length...