Family Day update
This commit is contained in:
parent
aac6731f2c
commit
9ad63ea473
2442 changed files with 39761 additions and 8255 deletions
|
|
@ -1,5 +1,9 @@
|
|||
{{Sorting Algorithm}}{{wikipedia|Cocktail sort}}
|
||||
{{Sorting Algorithm}}
|
||||
{{Wikipedia|Cocktail sort}}
|
||||
|
||||
|
||||
The cocktail shaker sort is an improvement on the [[Bubble Sort]].
|
||||
|
||||
The improvement is basically that values "bubble" both directions through the array, because on each iteration the cocktail shaker sort bubble sorts once forwards and once backwards. Pseudocode for the algorithm (from [[wp:Cocktail sort|wikipedia]]):
|
||||
'''function''' ''cocktailSort''( A : list of sortable items )
|
||||
'''do'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue