Split into two equal sums
Decide whether the numbers in nums can be divided into two groups with the same total, where every number goes into exactly one group. Return True or False.
nums has 1 to 200 positive integers, each at most 100. Aim for O(n · S) time, where S is the sum of nums.
Besides the tests, one large input (22 numbers, no split) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
can_split([1,5,11,5])→truecan_split([1,2,5])→falsecan_split([3,3,2,2,2])→true