Remix.run Logo
cousin_it 10 hours ago

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.