Skip to content

Commit ce92384

Browse files
authored
img anim
1 parent 9860631 commit ce92384

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<h1>Cocktail Shaker Sort</h1>
22
<p>Cocktail shaker sort, also known as bidirectional bubble sort, cocktail sort, shaker sort (which can also refer to a variant of selection sort), ripple sort, shuffle sort, or shuttle sort, is a variation of bubble sort that is both a stable sorting algorithm and a comparison sort. The algorithm differs from a bubble sort in that it sorts in both directions on each pass through the list. This sorting algorithm is only marginally more difficult to implement than a bubble sort, and solves the problem of turtles in bubble sorts. It provides only marginal performance improvements, and does not improve asymptotic performance; like the bubble sort, it is not of practical interest (insertion sort is preferred for simple sorts), though it finds some use in education.</p>
3-
<img src="https://en.wikipedia.org/wiki/Cocktail_shaker_sort">
43

5-
<a href="https://en.wikipedia.org/wiki/Bubble_sort">Source: Wikipedia</a>
4+
<img src="https://upload.wikimedia.org/wikipedia/commons/e/ef/Sorting_shaker_sort_anim.gif">
5+
6+
<a href="https://en.wikipedia.org/wiki/Bubble_sort">Source: Wikipedia</a>

0 commit comments

Comments
 (0)