If diff [ i ] is greater print it . Else print diff [ j ]
if ( diff [ i ] > diff [ j ] ) : NEW_LINE INDENT print ( arr [ i ] , end = " ▁ " ) NEW_LINE i += 1 NEW_LINE DEDENT else : NEW_LINE INDENT print ( arr [ j ] , end = " ▁ " ) NEW_LINE j -= 1 NEW_LINE DEDENT k -= 1 NEW_LINE