NeetCode #224LC-1052MediumSliding Window
← Back to All Problems#224 · #1052 · Grumpy Bookstore Owner(爱生气的书店老板)
📌 Problem Statement & Constraints
A bookstore owner has
customers[i] customers at minute i and a grumpy[i] flag that is 1 when they are grumpy (in which case those customers do not buy). The owner can use a secret technique for minutes consecutive minutes to make themselves not grumpy. Return the maximum number of satisfied customers. Constraints: 1 <= customers.length == grumpy.length <= 2 * 10^4, 0 <= customers[i] <= 1000.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!