Condition to check if the top of the stack is greater than the current element
if ( S [ i ] < s [ - 1 ] ) : NEW_LINE INDENT s . append ( S [ i ] ) NEW_LINE nix = min ( nix , S [ i ] ) NEW_LINE DEDENT else : NEW_LINE INDENT val = S [ i ] NEW_LINE DEDENT