Cocktail sort is a stable comparison sorting algorithm. It is a variation of bubble sort. In bubble sort, values only bubble in one direction. In cocktail sort, values bubble both directions, thus avoiding turtles. Complexity: * worst-case: O(n²) * average-case: O(n²) * best-case: O(n)
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
dcterms:subject | |
dbkwik:code/proper...iPageUsesTemplate | |
abstract |
|