You are viewing a single comment's thread. Return to all comments →
Javascript:
function quickSort(arr) { const pivot = arr[0]; const right = []; const left = []; for (const x of arr) { if (x < pivot) left.push(x); else right.push(x); } return [...left, ...right] }
Seems like cookies are disabled on this browser, please enable them to open this website
Quicksort 1 - Partition
You are viewing a single comment's thread. Return to all comments →
Javascript: