Searching for subsets (interesting complex task)

Boeing

New Member
I've just been doing Greplin programming challenge and went to the final level, where the task sounds like this:\[code\]For the final task, you must find all subsets of an arraywhere the largest number is the sum of the remaining numbers.For example, for an input of:(1, 2, 3, 4, 6)the subsets would be1 + 2 = 31 + 3 = 42 + 4 = 61 + 2 + 3 = 6Here is the list of numbers (3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99) you should run your code on.The password is the number of subsets. In the above case theanswer would be 4.\[/code\]Can you give me a suggestion what should I do here? I think brute-force doesn't fit here, does it?Don't write code!Thank you.
 
Back
Top