WorldQuant Interview Question

Divide array of numbers from 1 to 100 into 2 groups which have the same sum.

Interview Answers

Anonymous

Nov 18, 2016

There are 50 pairs each with sum 101: {1,100}, {2,99}, ..., {50,51}. Take any 25 of those in set 1 and the rest in set 2. Each set has sum 25x101.

2

Anonymous

Oct 20, 2014

Correction to abov solution : swap 25 and 50