You are viewing a single comment's thread. Return to all comments →
js single line solution:
const countingSort = (arr) => (arr.reduce((freqArr, num) => (freqArr[num]=++freqArr[num])&&freqArr, Array(100).fill(0)));
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 →
js single line solution: