I have a sorted list of n floating point numbers , and i want to split this list into m multiple lists in such a way that the sum of numbers in each list is roughly equal. Any thoughts?
I don't care how many numbers each list gets but the sum of numbers in each list should be fairly equal. One way that i have tried is to take subsections of the list equally (based on m) from the start and from the end and form a list , then shrink the existing list and repeat that process again.
I am fairly successful in that but the last list is either too heavier than others or too small than others , is there any better solution?