Function calls to store maximum and minimum values for respective ranges
prefix = prefixArr ( arr , prefix , N ) NEW_LINE suffix = suffixArr ( arr , suffix , N ) NEW_LINE for i in range ( q ) : NEW_LINE INDENT L = queries [ i ] [ 0 ] NEW_LINE R = queries [ i ] [ 1 ] NEW_LINE maxAndmin ( prefix , suffix , N , L , R ) NEW_LINE DEDENT