You are viewing a single comment's thread. Return to all comments →
JavaScript solution:
function countingSort(arr) { const n = arr.length; const frequency = Array(n).fill(0); for (let i = 0; i < n; i++) { frequency[arr[i]] += 1; } return frequency.slice(0, 100); }
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
JavaScript solution: