Skip to content

Conversation

@Im-Not-God
Copy link

This is my first attempt of the Cocktail Shaker Sort Algorithm, feel free to check and improve it.

This is my first attempt of the Cocktail Shaker Sort Algorithm, feel free to check and improve it.
end --;

// if nothing swapped, then array is sorted.
if (swapped == false)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use strict equality operator here?
if (swapped === false)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants