Skip to content

hechangmin/jssort

Folders and files

Name Name
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Common sorting - JS implementation

For reference only, do not use. Because the sort of javascript array is optimized by the script engine, its performance is often better than that written by itself.


  • Common sorting
    • Bubble sort
    • Select Sort
    • Quick sort
    • Insert Sort
    • Shell Sort

Test verification

 var  arr  =  [ one , two , three , fifty-six , thirty-four , two , twenty , twelve ] ;
 console . log ( Sort . quick ( arr ) ) ;

 var  arr1  =  [ one , two , three , fifty-six , thirty-four , two , twenty , twelve ] ;
 console . log ( Sort . bubble ( arr1 ) ) ;

 var  arr2  =  [ one , two , three , fifty-six , thirty-four , two , twenty , twelve ] ;
 console . log ( Sort . selection ( arr2 ) ) ;

 var  arr3  =  [ one , two , three , fifty-six , thirty-four , two , twenty , twelve ] ;
 console . log ( Sort . insertion ( arr3 ) ) ;

 var  arr4  =  [ one , two , three , fifty-six , thirty-four , two , twenty , twelve ] ;
 console . log ( Sort . shell ( arr4 ) ) ;

Welcome to contact me hechangmin@gmail.com

About

Common sorting algorithm - js version

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published