题目描述
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.
Example 1:
1 | Input: num = "123", target = 6 |
Example 2:
1 | Input: num = "232", target = 8 |
Example 3:
1 | Input: num = "105", target = 5 |
Example 4:
1 | Input: num = "00", target = 0 |
Example 5:
1 | Input: num = "3456237490", target = 9191 |