mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-08 03:45:23 +08:00
Cocktail Shaker Sort | Formatted Wikipedia Link
This commit is contained in:
@ -3,8 +3,9 @@
|
|||||||
* The algorithm extends bubble sort by operating in two directions.
|
* The algorithm extends bubble sort by operating in two directions.
|
||||||
* While it improves on bubble sort by more quickly moving items to the beginning of the list,
|
* While it improves on bubble sort by more quickly moving items to the beginning of the list,
|
||||||
* it provides only marginal performance improvements.
|
* it provides only marginal performance improvements.
|
||||||
* more information: https://en.wikipedia.org/wiki/Cocktail_shaker_sort
|
*
|
||||||
* more information: https://en.wikipedia.org/wiki/Bubble_sort
|
* Wikipedia (Cocktail Shaker Sort): https://en.wikipedia.org/wiki/Cocktail_shaker_sort
|
||||||
|
* Wikipedia (Bubble Sort): https://en.wikipedia.org/wiki/Bubble_sort
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function cocktailShakerSort (items) {
|
function cocktailShakerSort (items) {
|
||||||
|
Reference in New Issue
Block a user