You are viewing a single comment's thread. Return to all comments →
My answer with Typescript, stuck a while cause dk 100 fixed size of result
function countingSort(arr: number[]): number[] { let size = 100 // arr.length let frequency = new Array<number>(size).fill(0) for (let num of arr) frequency[num] = (frequency[num] || 0) + 1 return frequency }
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 answer with Typescript, stuck a while cause dk 100 fixed size of result