You are viewing a single comment's thread. Return to all comments →
My TypeScript solution:
function countingSort(arr: number[]): number[] { const frequencyArray = (new Array(100)).fill(0); const length = arr.length; for (let i = 0; i < length; i++) { frequencyArray[arr[i]] += 1; } return frequencyArray; }
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 →
My TypeScript solution: