Divide list into two equal parts algorithm
问题 Related questions: Algorithm to Divide a list of numbers into 2 equal sum lists divide list in two parts that their sum closest to each other Let's assume I have a list, which contains exactly 2k elements. Now, I'm willing to split it into two parts, where each part has a length of k while trying to make the sum of the parts as equal as possible. Quick example: [3, 4, 4, 1, 2, 1] might be splitted to [1, 4, 3] and [1, 2, 4] and the sum difference will be 1 Now - if the parts can have