Given a string that contains only digits 0-9
and a target
value, return all possibilities to add binary operators (not unary) +, -, or *
between the digits so they evaluate to the target value.
The trouble here is how to separate the *
and the other operators so I can have a "cumulative" sum. Because
1+3*2
is based on 3*2
and not 1+...
Please help me out. Thanks