I have the following array
var nums = [1,2,3,4];
Now i want to convert this into 2 new arrays where the sum of both arrays should be same, so the final result will be something
arr1 = [2,3];
arr2 = [1,4];
I have the following array
var nums = [1,2,3,4];
Now i want to convert this into 2 new arrays where the sum of both arrays should be same, so the final result will be something
arr1 = [2,3];
arr2 = [1,4];