Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{{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]]):
|
||||
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'''
|
||||
swapped := false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue