Shakersort is a bidirectional variation of bubble sort. This is stable sorting algorithm with time complexity O(n*n).
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)