-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Wiggle sort #2419
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
Wiggle sort #2419
Conversation
sorts/wiggle_sort.py
Outdated
def wiggle_sort(nums): | ||
"""Perform Wiggle Sort.""" | ||
for i in range(len(nums)): | ||
def wiggle_sort(nums: list): |
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.
Please add return hint. Please also provide doctest with float numbers.
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.
Done.
@mateuszz0000 If this is ready to merge then please approve and then click Squash & merge. |
@mateuszz0000 Thanks. Are there any other open PRs that you think should be landed? |
* wiggle sort : type hint + doctest * fixed function name in docstring * correction
Describe your change:
Improved wiggle_sort.py, mainly with type hinting and doctests.
Checklist:
Fixes: #{$ISSUE_NO}
.