title: Split array into half with equal or approximately equal array sum
body: <p>Problem:</p>
  
  <p>Array with numeric values needs to be split in half with approximately equal or if possible equal array sum. Number or order of elements in arrays is not important.</p>
  
  <pre><code>$probabilites = array(0.4, 0.15, 0.1, 0.1, 0.2, 0.2, 0.3); # 1.45
  
  $probabilites[0] = array(0.4, 0.15, 0.1, 0.1); # 0.75
  $probabilites[1] = array(0.2, 0.2, 0.3); # 0.7 
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>Thanks.</p>