javascript快速排序算法代码
function qsort(a) { if (a.length == 0) return []; var left = []; var right = []; var pivot = a[0]; for (var i = a.length; --i;) { if (a[i] < pivot) left.push(a[i]); else right.push(a[i]); } return qsort(left).concat(pivot, qsort(right)); }