-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Adding stooge sort #1206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding stooge sort #1206
Conversation
The failing Travis CI builds are not caused by this PR but are instead caused by my mistake in #1205. |
While waiting, you should be able to test this locally with python3 -m doctest -v sorts/stooge_sort.py |
It is ready, could you do the review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! Thanks for your patience with the broken build and thanks for your contribution.
Thank you! |
On thing to think about in the future is the difference between list.sort() and sorted(list) in Python. The first is an in-place sort (like this stooge_sort()) while the second returns a new sorted list without modifying the original list. Both are useful but I tend to like the second better. |
Ok, thank you for your time. |
* Adding stooge sort * Updated doctest * Just added underscore in the name
No description provided.