-
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