Given a string representing toys, a budget, toy costs, and a rule allowing a specific toy type to be bought for free, find the maximum number of consecutive toys that can be purchased within budget.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.