Just another Perl shrine | |
PerlMonks |
Re^2: partition of an arrayby mostvisited (Initiate) |
on Mar 09, 2009 at 05:50 UTC ( [id://749214]=note: print w/replies, xml ) | Need Help?? |
this code would simply divide the array.. but it doesnt take care of the sum condition. As i have mentioned the difference of sum of elements of two new arrays should be minimal. The new partitions should be balanced also. How to maintain that property ?
In Section
Seekers of Perl Wisdom
|
|