Max sum — what's the optimal solution?

Revision en1, by Bobek, 2017-08-31 09:24:34

I have array with N numbers and I'm allowed to add (),+-* between to generate max sum. Unary operator is not allowed. I know the solution for only positive numbers but I don't know how to handle negatives. Could you please give me any hints or solution?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Bobek 2017-08-31 09:24:34 300 Initial revision (published)