Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function quickSortF(arr) {
- if (!arr.length) return [];
- const [head, ...tail] = arr,
- left = tail.filter(e => e < head),
- right = tail.filter(e => e >= head);
- return quickSortF(left).concat(head, quickSortF(right));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement