Given a set of integers S:
How can the set be divided into k parts such that the sum of each part is minimal?
Please give also a C
implementation.
Example:
S = {1, 2, 3, 4, 5, 6} and k = 3
The partition
S1 = {1, 6}
S2 = {2, 5}
S3 = {3, 4}
has the property that the sum of each partition is minimal.