Counting Sort 1

  • + 0 comments

    My approach for Javascript

    function countingSort(arr) {
        const countArr = new Array(100).fill(0);
        
        for(const a of arr) {
            countArr[a]++
        }
        
        return countArr
    
    }