Cocktail Sort

Hello!

To view this page you need Microsoft Silverlight 3 plug-in.
Silverlight will enable your browser to understand complex Rich Internet Applications.
After installing (~10 seconds), you will be able to view and execute live algorithms.

Click here to download the plugin directly from Microsoft (4 MB)
If you want to learn more about MS Silverlight, take a look at this Wikipedia article.
Output
type in the input above and click 'Execute'
the result will be outputted here
Related Algorithms
Discussion
0
no comments yet
login to leave a comment
Version 1
Version 1 by creker
+1
Coctail sort is a variation of bubble sort that is both a stable sorting algorithm and a comparison sort. The algorithm differs from 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 bubble sort, and solves the problem with so-called turtles in bubble sort.

Worst case performance O(n²)
Best case performance O(n)
Average case performance O(n²)

http://en.wikipedia.org/wiki/Cocktail_sort
By creker
10 months and 2 weeks ago
up down

implementations

one version available

rated by

one user - list?

viewed by

3 users - list?

favorited by

0 users - list?

last activity

10 months and 2 weeks ago