Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The number of operators in the equation is less. Could you find the right answer then generate all possible answers using different orders of operations?
Divide the equation into blocks separated by the operators, and use memoization on the results of blocks for optimization.
Use set and the max limit of the answer for further optimization.