Skip to content

Files

Latest commit

bde20f5 · Oct 1, 2022

History

History

shaker_sort

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)