Search
⌘K
Get Premium
Leetcode 2232. Minimize Result by Adding Parentheses to Expression
Given an expression "num1+num2", insert a '(' somewhere to the left of '+' and a ')' to the right to minimize the evaluated result — equivalently choose split positions that minimize leftMultiplier * (innerLeft + innerRight) * rightMultiplier, with brute-force search feasible due to the short input length.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.