-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
Create slowsort.py #3865
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
Create slowsort.py #3865
Conversation
added slowsort algorithm implementation to sorts
I believe this algorithm has been already added here. |
The algorithm you linked to is Bogosort, which is an entirely different algorithm, but it is also called Slowsort at times. |
Oh, ok. Sorry for the misunderstanding |
Isort failed, looks like you need to reorder the imports |
Done! |
Thanks for contributing to open source 👍 @cclauss could you review and merge this pull request? |
@algorithms-keeper 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.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper
commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper review
to trigger the checks for only added pull request files@algorithms-keeper review-all
to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will only modify the labels accordingly.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
sorts/slowsort.py
Outdated
from typing import Optional | ||
|
||
|
||
def slowsort(sequence: list, i: Optional[int] = None, j: Optional[int] = None) -> None: |
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 provide descriptive name for the parameter: i
Please provide descriptive name for the parameter: j
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
A maintainer should probably merge this PR unless there's an issue; we don't want valid pull requests to be closed as stale 😞 |
@mrmaxguns If you believe that this PR is ready to be landed, please click the |
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.
This pull request is good to good to go:
- Unique
- Docstrings
- Type hints
- Readability
- Doctests
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.
this looks good to go, although i would like to ask if it is prone to recursion error
@mateuszz0000 Is this ready to land? |
Nothing but a |
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.
I am not a fan of purposefully inefficient algorithms of little utility (esp. sleep_sort!) -- perhaps the humourous nature is beyond my comprehension. Heating the planet with inefficient algorithms is what TheAlgorithms are trying to avoid. But this one has been batted about long enough so let's land it...
* Create slowsort.py added slowsort algorithm implementation to sorts * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py
* Create slowsort.py added slowsort algorithm implementation to sorts * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py
* Create slowsort.py added slowsort algorithm implementation to sorts * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py * Update slowsort.py
added slowsort algorithm implementation to sorts
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.