Left and right boundaries of current range
L = q [ i ] [ 0 ] ; R = q [ i ] [ 1 ] ; NEW_LINE ans = MAX ; NEW_LINE for i in range ( L , R ) : NEW_LINE INDENT ans = min ( ans , arr [ i ] ) ; NEW_LINE DEDENT