Find the maximum consecutive length of 0 s present in the string
int cnt = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( str . charAt ( i ) == '0' ) cnt ++ ; else { mx = Math . max ( mx , cnt ) ; cnt = 0 ; } }