...
/Challenge: Maximum Value of an Arithmetic Expression
Challenge: Maximum Value of an Arithmetic Expression
Solve the Maximum Value of an Arithmetic Expression Problem.
Problem
Maximum Value of an Arithmetic Expression Problem
Parenthesize an arithmetic expression to maximize its value.
Input: An arithmetic expression consisting of digits as well as plus, minus, and multiplication signs.
Output: Add parentheses to the expression in order to maximize its value.
For example, for an expression there are two ways of parenthesizing it: and ...