Learning / Creating new and weird sorting algorithms and providing visualizations
- 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.
- Worst complexity: n^2
- Average complexity: n^2
- Best complexity: n
- Space complexity: 1
- Method: Exchanging
- Stable: Yes
- Class: Comparison sort
