Skip to content

1052. Grumpy Bookstore Owner #215

Answered by mah-shamim
mah-shamim asked this question in Q&A
Discussion options

You must be logged in to vote

The problem asks us to calculate the maximum number of customers that can be satisfied at a bookstore, given that the bookstore owner can use a special technique to remain non-grumpy for minutes consecutive minutes. The goal is to find the maximum number of customers that can be satisfied during the store's opening hours. The satisfaction of customers depends on whether the bookstore owner is grumpy during each minute. If the owner is grumpy, customers entering that minute are not satisfied, but if they are not grumpy, the customers are satisfied.

Key Points

  • The problem involves two arrays: customers and grumpy.
    • customers[i] represents the number of customers entering at minute i.
    • grump…

Replies: 1 comment 2 replies

Comment options

mah-shamim
Jan 2, 2025
Maintainer Author

You must be logged in to vote
2 replies
@basharul-siddike
Comment options

@mah-shamim
Comment options

mah-shamim Jan 2, 2025
Maintainer Author

Answer selected by basharul-siddike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested medium Difficulty
2 participants