Longest Zero Gap
Print the length of the longest block of consecutive 0s.
Input: one line with a binary string.
Output: the longest run of 0s (0 if none).
Constraints:
- 1 ≤ |S| ≤ 105
Sample Tests
Input 1
100010
Output 1
3
Input 2
111
Output 2
0
Discussion (opens after you solve — no spoilers before)
No comments yet.