Given a string expression representing a valid arithmetic expression made of non negative integers and the binary operators +, -, and *, return all possible results from computing the expression by inserting parentheses in every possible way.
The returned list may be in any order, and duplicate results are allowed if different parenthesizations produce the same value.
Note: The input contains only numbers and the operators
+,-, and*, and the numbers are written without an explicit sign.
Constraints:
expression.length
expression consists of digits and the operator '+', '-', and '*'
All integer values in expression are in the range
The integer values in expression do not have a leading '-' or '+' denoting the sign
Given a string expression representing a valid arithmetic expression made of non negative integers and the binary operators +, -, and *, return all possible results from computing the expression by inserting parentheses in every possible way.
The returned list may be in any order, and duplicate results are allowed if different parenthesizations produce the same value.
Note: The input contains only numbers and the operators
+,-, and*, and the numbers are written without an explicit sign.
Constraints:
expression.length
expression consists of digits and the operator '+', '-', and '*'
All integer values in expression are in the range
The integer values in expression do not have a leading '-' or '+' denoting the sign