in the range
if qs <= ss and se <= qe : NEW_LINE INDENT return st [ i ] NEW_LINE DEDENT mid = ( se + ss ) >> 1 NEW_LINE stt = RMQ ( ss , mid , qs , qe , 2 * i + 1 ) NEW_LINE en = RMQ ( mid + 1 , se , qs , qe , 2 * i + 2 ) NEW_LINE if stt != - 1 and en != - 1 : NEW_LINE INDENT if l [ stt ] < l [ en ] : NEW_LINE INDENT return stt NEW_LINE DEDENT return en NEW_LINE DEDENT elif stt != - 1 : NEW_LINE INDENT return stt NEW_LINE DEDENT elif en != - 1 : NEW_LINE INDENT return en NEW_LINE DEDENT