queryng for the maximum length substring from bit array
if ( pref ( n ) - pref ( z [ i ] - 1 ) >= 2 ) { len = Math . Max ( len , z [ i ] ) ; } } if ( len == 0 ) Console . WriteLine ( " - 1" ) ; else Console . WriteLine ( s . Substring ( 0 , len ) ) ; } }