I am having an array a = [10, 20,30, 15,15] here I need to divide the array to n sub arrays such that their sum will be equal. op: [[10,20],[30],[15,15]]
Asked
Active
Viewed 163 times
0
-
https://en.wikipedia.org/wiki/Subset_sum_problem (the wiki page describes the decision problem only...) – hiro protagonist Jul 03 '19 at 06:15
-
Welcome to StackOverFlow! Have a look on [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/reprex) and what is a [good question](https://stackoverflow.com/help/how-to-ask). You will even have rewards at visiting those pages. We will not write code for you/do your home work. Share what you have tried so far and we will try to improve it. – shaik moeed Jul 03 '19 at 06:15
-
Same problem can be found here https://stackoverflow.com/questions/35517051/split-a-list-of-numbers-into-n-chunks-such-that-the-chunks-have-close-to-equal – Goutham raju Jul 05 '19 at 09:43