compare the size of the current subarray with the maximum size so far
if ( ( e - s ) > ( maxe - maxs ) ) { maxe = e ; maxs = s ; } } cout << " The ▁ maximum ▁ size ▁ is ▁ " << maxe - maxs + 1 << " ▁ and ▁ " " the ▁ subarray ▁ is ▁ as ▁ follows STRNEWLINE " ; for ( int i = maxs ; i <= maxe ; i ++ ) cout << arr [ i ] << " ▁ " ; }