title: Partial sum lookup / partial sum set assignment
body: <p>I have following problem to solve. As as input i have 2 decimal arrays. Sum of elements of both of them is equal. Actuall problem is to assign values from one array to second one by partial sums - if some element from one array is a sum of any number of elements from second array - they should be assigned to each other.</p>
  
  <p>Sample1:</p>
  
  <p>Array1: 25.0, 25.0, 50.0, 50.0
  Array2: 50.0, 100.0</p>
  
  <p>Expected result: 50.0 is sum of 25.0 and 25.0, 100.0 is a sum of 50.0 and 50.0<br>
  (0->0,1; 1->2,3)</p>
  
  <p>Sample2:</p>
  
  <p>Array1: 20.0, 70.0, 80.0, 130.0
  Array2: 100.0, 200.0</p>
  
  <p>Expected result:
  100 = 20+80, 200 = 70+130   (0->0,2; 1->1,3)</p>
  
  <p>Idea is to return assigned array element indexes and return as less assingments as possible.</p>