โ† Airtel questions

Ways to obtain maximum consecutive 1s by replacing zeros

Filed under Airtel

The question

Given a binary string and an integer k representing the maximum number of 0s you can replace with 1, find the number of ways to achieve the maximum possible length of consecutive 1s.

No write-up yet. Related questions below have one.

Related Airtel questions

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