You are viewing a single comment's thread. Return to all comments →
JS
function countSort(inputArray) { inputArray.filter((_, index) => index < inputArray.length / 2).forEach((element => element[1] = '-')); inputArray.sort((a, b) => a[0] - b[0]); console.log(inputArray.map(element => element[1]).join(" ").trimEnd()); }
Seems like cookies are disabled on this browser, please enable them to open this website
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
JS