BETA
longest substring containing '1'
Submissions: 2027   Accuracy:

37.74%

  Difficulty: School
*School Problem's Submission isn't counted in score!
     

Given a function that takes a binary string. The task is to return the longest size of contiguous substring containing only ‘1’.

Input:
The first line of input contains an integer T denoting the no of test cases.Then T test cases follow. Each test case contains a string S.

Output:
For each test case return the maximum length of required sub string.

Constraints: 
1<=T<=100
1<=|string length|<=104

Example:
Input:

2
110
11101110

Output:
2
3

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arun Tyagi, Saksham Raj Seth
Author: arun03


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.