Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

#常见排序-JS 实现

仅供学习参考,切勿采用。因为javascript array 之sort 经过脚本引擎优化,性能往往比自己写的好。


  • 常见排序
    • 冒泡排序
    • 选择排序
    • 快速排序
    • 插入排序
    • 希尔排序

Test 验证

var arr = [1,2,3,56,34,2,20,12];
console.log(Sort.quick(arr));

var arr1 = [1,2,3,56,34,2,20,12];
console.log(Sort.bubble(arr1));

var arr2 = [1,2,3,56,34,2,20,12];
console.log(Sort.selection(arr2));

var arr3 = [1,2,3,56,34,2,20,12];
console.log(Sort.insertion(arr3));

var arr4 = [1,2,3,56,34,2,20,12];
console.log(Sort.shell(arr4));

欢迎联系我 hechangmin@gmail.com

About

常见排序算法-js版本

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.