Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 499 Bytes

README.md

File metadata and controls

11 lines (7 loc) · 499 Bytes

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)