title: Maximizing expression with only division operator
body: <p>The problem is that I have to find algorithm that maximizes expression of n integers (they can be negative) only by putting brackets on some places. I can't change the order of numbers.</p>
  
  <p>Example:</p>
  
  <p>for input: 4 6 8 2 5</p>
  
  <p>output should be: 4/(6/8/2/5)</p>
  
  <p>The goal is to put brackets to maximize the result of given expression. In some cases is not necessary to put brackets at all.</p>
  
  <p>Example:</p>
  
  <p>input: 8 -6 3 -2 -4 5
  output: 8 / -6 / 3 / -2 / -4 / 5</p>
  
  <p>The output should be maximal value possible!</p>
  
  <p>I had idea of finding all possibilities using recursion, but my solution wasn't approved by professor (he said that there is an easier and faster solution!) and now when my deadline has passed I am looking for direct help! </p>