Edge Cases
if ( l == 0 && r == ( N - 1 ) ) document . write ( " " ) ; else if ( l == 0 ) document . write ( suffix_max [ r + 1 ] + " " ) ; else if ( r == ( N - 1 ) ) document . write ( prefix_max [ l - 1 ] + " " ) ;