Count Of Substrings Containing K Ones

easy
1. You will be given a string 2. You will also be given an integer k 3. You need to find number of substrings possible in given string, with k 1's in them 4. Return this count 5. Input and output is handled for you 6. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you.

Output Format

Output is handled for you.

Constraints

0<=K<=20
 1<=|String length|<=105

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
100110
3
Output
2
Previous
Cheapest Flights Within K Stops
Next
Equivalent Sub Arrays

Related Questions