Given a string S of zeroes and ones. Given range (L,R), you have to find the 1st and last occuring 1 in the range and tell the number of zeros between the first and last ones including L and R index.

1<=L,R<=10^5.

Eg:

0010011001

L,R=1,8

Output: 2

Pls help in this question. O(n^2) not working