If this bar is higher than the bar on top stack , push it to stack
if ( len ( result ) == 0 ) or ( row [ result [ - 1 ] ] <= row [ i ] ) : NEW_LINE INDENT result . append ( i ) NEW_LINE i += 1 NEW_LINE DEDENT else : NEW_LINE