Grumpy Bookstore Owner Problem

Grumpy Bookstore Owner Problem — ExecCode Medium DSA Practice

Solve the Grumpy Bookstore Owner problem on ExecCode. Free online medium DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Grumpy Bookstore Owner. Best window to stay calm. For Grumpy Bookstore Owner, focus on the exact input variables, return only the requested value, and preserve the required time complexity for the intended pattern.

Examples

Input {"customers": [1, 0, 1, 2, 1, 1, 7, 5], "grumpy": [0, 1, 0, 1, 0, 1, 0, 1], "minutes": 3}; Output 16

Constraints

1 ≤ n ≤ 10^5

Practice Grumpy Bookstore Owner free on ExecCode. Browse DSA problems, topic map, and placement guides.