abhijeetnarkhede69198
BAN USER- 1 Answer variation of bin packing problem
We have “k” bins and “n” objects where each bin has same capacity and capacity is equal to sum of weights of all “n” objects divided by k.
- abhijeetnarkhede69198 December 11, 2014
We need to pack these all “n” items in “k” bins such a way that all bins are equally heavy.
some test cases –
input –
5 items { 2,3,4,5,7 }
and 3 bins
output –
{ {7},{5,2},{3,4} }
input –
6 items { 4,4,4,4,4,5 }
and 5 bins
output –
NOT POSSIBLE| Flag | PURGE - 0 Answers variation of bin packing problem
We have “k” bins and “n” objects where each bin has same capacity and capacity is equal to sum of weights of all “n” objects divided by k.
- abhijeetnarkhede69198 December 11, 2014
We need to pack these all “n” items in “k” bins such a way that all bins are equally heavy.
some test cases –
input –
5 items { 2,3,4,5,7 }
and 3 bins
output –
{ {7},{5,2},{3,4} }
input –
6 items { 4,4,4,4,4,5 }
and 5 bins
output –
NOT POSSIBLE| Flag | PURGE - 5 Answers variation of bin packing problem
We have “k” bins and “n” objects where each bin has same capacity and capacity is equal to sum of weights of all “n” objects divided by k.
- abhijeetnarkhede69198 December 11, 2014
We need to pack these all “n” items in “k” bins such a way that all bins are equally heavy.
some test cases –
input –
5 items { 2,3,4,5,7 }
and 3 bins
output –
{ {7},{5,2},{3,4} }
input –
6 items { 4,4,4,4,4,5 }
and 5 bins
output –
NOT POSSIBLE| Flag | PURGE
try this test case on your code -
- abhijeetnarkhede69198 December 17, 20146 items, 2 bins
{ 6,5,3,2,2,2 }
output -
{ {6,2,2}, {5,3,2} }