You are viewing a single comment's thread. Return to all comments →
Here is my approach.
arr.sort((a,b) => a-b); console.log(String(arr.slice(0,4).reduce((a,b)=>a+b)) + ' ' + String(arr.slice(1,5).reduce((a,b)=>a+b)));
Seems like cookies are disabled on this browser, please enable them to open this website
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
Here is my approach.