Find maximum and minimum values from the ranges [ 0 , L - 1 ] and [ R + 1 , N - 1 ]
else { maximum = Math . max ( prefix [ L - 1 ] [ 0 ] , suffix [ R + 1 ] [ 0 ] ) ; minimum = Math . min ( prefix [ L - 1 ] [ 1 ] , suffix [ R + 1 ] [ 1 ] ) ; }