← MakeMyTrip questions

Maximum Consecutive Toys within Budget

Filed under MakeMyTrip

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.

Related MakeMyTrip questions

Collected from public candidate posts and coding forums. Updated Nov 2026.