you can  use an algorithm similar to matrix chain multiplication i.e. if
dp[i][j] is the maximum value that you can get with the numbers v_i to v_j
and in order to maximize it find k that maximizes ( dp[i][k]  op_k  dp[k][j]
)
v_i is the ith value and op_k is the kth operator
obviously if i==j : dp[i][j] = v_i

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to