-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Update sorts/quick_sort_3_partition.py #2507
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
Conversation
Another quick sort algorithm, returns a new sorted list
Hey @taseikyo, TravisCI finished with status TravisBuddy Request Identifier: 0386d740-0206-11eb-aba2-872ffb2742c8 |
rename quick_sort_3partition to quick_sort_3part
Yes, we are implementing https://en.wikipedia.org/wiki/Quicksort#Three-way_radix_quicksort. First divide the list into three parts. Then recursively sort the "less than" and "greater than" partitions. |
rename quick_sort_3part to three_way_radix_quicksort Three-way radix quicksort: https://en.wikipedia.org/wiki/Quicksort#Three-way_radix_quicksort First divide the list into three parts. Then recursively sort the "less than" and "greater than" partitions.
sorts/quick_sort_3_partition.py
Outdated
@@ -1,4 +1,4 @@ | |||
def quick_sort_3partition(sorting: list, left: int, right: int) -> list: | |||
def quick_sort_3partition(sorting: list, left: int, right: int): |
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.
Why this change?
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.
quick_sort_3partition
does not return a new list, it just updates in place. So I remove -> list
.
Co-authored-by: Christian Clauss <[email protected]>
* Update sorts/quick_sort_3partition.py Another quick sort algorithm, returns a new sorted list * Update sorts/quick_sort_3_partition.py rename quick_sort_3partition to quick_sort_3part * Update sorts/quick_sort_3_partition.py rename quick_sort_3part to three_way_radix_quicksort Three-way radix quicksort: https://en.wikipedia.org/wiki/Quicksort#Three-way_radix_quicksort First divide the list into three parts. Then recursively sort the "less than" and "greater than" partitions. * Update sorts/quick_sort_3_partition.py Co-authored-by: Christian Clauss <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
* Update sorts/quick_sort_3partition.py Another quick sort algorithm, returns a new sorted list * Update sorts/quick_sort_3_partition.py rename quick_sort_3partition to quick_sort_3part * Update sorts/quick_sort_3_partition.py rename quick_sort_3part to three_way_radix_quicksort Three-way radix quicksort: https://en.wikipedia.org/wiki/Quicksort#Three-way_radix_quicksort First divide the list into three parts. Then recursively sort the "less than" and "greater than" partitions. * Update sorts/quick_sort_3_partition.py Co-authored-by: Christian Clauss <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
Another quick sort algorithm, returns a new sorted list
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.