'How can N integers be divided into M equally sized groups such that the difference between their maximum and minimum sums is minimum?

How can N integers be divided into M equally sized groups such that the difference between their maximum and minimum sums is minimum?

I see that it belongs to the partition kind of problems, but I didn't find a solution that matches both "M > 2" and "equally sized" criteria



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source