You are viewing a single comment's thread. Return to all comments →
JS solution :
function equalizeArray(arr) { return arr.length - Math.max(...[...new Set(arr)].map((num, i) => arr.reduce((acc, next) => next == num ? acc + 1 : acc, 0))) }
Seems like cookies are disabled on this browser, please enable them to open this website
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
JS solution :