zingix
December 13th, 2006, 04:50 AM
Hi all,
Do you have any suggestions for the following problem:
You've got n-Numbers (e.g. 1,2,3,4,5). Put them into two bottles, so that the difference between these two bottles is minimal. Output should be the minimal differnece.
First bottle contains: 3,4 (3+4=7)
Second bottle: 1,2,5 (1+2+5=8)
So the solution would be: 1 (minimal difference)
Any ideas how to solve that with a program?
Thanks
Do you have any suggestions for the following problem:
You've got n-Numbers (e.g. 1,2,3,4,5). Put them into two bottles, so that the difference between these two bottles is minimal. Output should be the minimal differnece.
First bottle contains: 3,4 (3+4=7)
Second bottle: 1,2,5 (1+2+5=8)
So the solution would be: 1 (minimal difference)
Any ideas how to solve that with a program?
Thanks