logoalt Hacker News

cousin_ityesterday at 10:24 AM0 repliesview on HN

Is it the same as flipping every parenthesis to the other side of the number it's adjacent to, and then adding enough parentheses at the start and end?

For example,

    (1 + 2) * (3 + 4)
becomes

    1) + (2 * 3) + (4
and then we add the missing parentheses and it becomes

    (1) + (2 * 3) + (4)
which seems to achieve a similar goal and is pretty unambiguous.