GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hechangmin/jssort: 常见排序算法-js版本

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
sort.js
sort.js
 
 

Repository files navigation

#常见排序-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));

欢迎联系我 [email protected]

About

常见排序算法-js版本

Resources

Readme
Activity

Stars

11 stars

Watchers

1 watching

Forks

7 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.