Grumpy Bookstore Owner
Medium
Sliding Window (Advanced)
A store owner is grumpy in some minutes (grumpy[i] = 1), making the customers of that minute unsatisfied. The owner can stay calm for one window of exactly m consecutive minutes. Print the maximum number of satisfied customers.
Constraints
1 <= m <= n <= 2 * 10^4
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.