Counting Sort 1

  • + 0 comments

    js single line solution:

    const countingSort = (arr) => (arr.reduce((freqArr, num) => (freqArr[num]=++freqArr[num])&&freqArr, Array(100).fill(0)));