I have an array that looks like this:
arr = [
{name:"Name",value:0}
{name:"Name",value:2}
{name:"Name",value:5}
{name:"Name",value:3}
]
And I would like to group the items from the array from above into an predefined amount of groups (1,2,3 or more) with the condition that every group value sum must be close as possible to the other group's sum.
Any suggestions or solutions are welcome.