- 0of 0 votes
Given an array[0, n-1], each number of the array is positive int. Your task is adding the operators,"+","*", "(",")" (add, multiply, parenthesis) to maximize the result . The position in the array is Fixed.- justtest August 19, 2014 in United States
For example, "2,1,1,2", you can get (2+1)*(2+1)=9.
Follow up, if the number may be negative , how to solve it ?
| Report Duplicate | Flag | PURGE
Algorithm Brain Teasers Coding Data Structures Dynamic Programming
Interview Type: In-Person
Open Chat in New Window