Pergunta de entrevista da empresa WorldQuant

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

Respostas da entrevista

Sigiloso

18 de nov. de 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

Sigiloso

20 de out. de 2014

Correction to abov solution : swap 25 and 50