×

Cocktail shaker sort

Sorting algorithm
Cocktail shaker sort, also known as bidirectional bubble sort, cocktail sort, shaker sort, ripple sort, shuffle sort, or shuttle sort, is an extension of bubble sort. The algorithm extends bubble sort by operating in two directions. Wikipedia
Worst-case complexity: n^2
Best complexity: n
Class: Sorting algorithm
Data structure: Array