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
Got it using help and skimming over solution
What an amazing problem. Since I did not get it from this website, how difficult would this be on here?
Div1-C?
You meant Div2-C ?