📅  最后修改于: 2022-03-11 15:02:02.660000             🧑  作者: Mango
const quicksort = arr =>
arr.length <= 1
? arr
: [
...quicksort(arr.slice(1).filter((el) => el < arr[0])),
arr[0],
...quicksort(arr.slice(1).filter((el) => el >= arr[0])),
];