You are viewing a single comment's thread. Return to all comments →
javascript one linear solution -
const plusMinus=(arr)=>(console.log(...arr.reduce((a,n)=>void(n<0?a[1]++:n?a[0]++:a[2]++)||a,[0,0,0]).map(n=>`${(n/arr.length).toFixed(5)}\n`)));
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
javascript one linear solution -