title: Dividing an array with equal XORs
body: <p>i don't know how to go about this problem >></p>
  
  <p>Given an array of integers, we need to divide that array into two parts such that</p>
  
  <p>1) xor of 1st set is equal to that of second</p>
  
  <p>2) difference between sum of elements of two parts is maximum.</p>
  
  <p>for example:</p>
  
  <p>if given array is [4,2,6]</p>
  
  <p>then it can be divide into [2],[4,6],</p>
  
  <pre><code>          where xor(2) = 010
                  xor(4,6) = 100^110 = 010 = xor(2)
  </code></pre>
  
  <p>and difference between sums of two parts = (4+6)-2 = 8(max difference possible which satisfies the above constraints).</p>
  
  <p>(if it is not for the second constraint, dividing the array into parts with equal sum would have been sufficient).</p>