JavaScript快速排序_javascript技巧
来源:懂视网
责编:小采
时间:2020-11-27 20:34:24
JavaScript快速排序_javascript技巧
JavaScript快速排序_javascript技巧: function quickSort() { function doSort(a,s,e) { if(stemp); if(s>e)break; var tem=a[s]; a[s]=a[e]; a[e]=tem; } a[st]=a[e]; a[e]=temp; return e; } doSort(this,0,this.length-1); return this; } Array.prototype.quickSort=quickSort; alert(new A
导读JavaScript快速排序_javascript技巧: function quickSort() { function doSort(a,s,e) { if(stemp); if(s>e)break; var tem=a[s]; a[s]=a[e]; a[e]=tem; } a[st]=a[e]; a[e]=temp; return e; } doSort(this,0,this.length-1); return this; } Array.prototype.quickSort=quickSort; alert(new A