Skip to content

Latest commit

 

History

History
 
 

shaker_sort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Shaker Sort / Cocktail Sort

Shakersort is a bidirectional variation of bubble sort. This is stable sorting algorithm with time complexity O(n*n).

Description

This algorithm differs from bubble sort in that it works in both directions. In the first, the lightest element ascends to the end of the list and in the second heaviest element descends to the beginning of the list (or vice versa)