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)
Graph IRI | Count |
---|---|
http://dbkwik.webdatacommons.org | 6 |