Commit Graph

5 Commits

Author SHA1 Message Date
MarineJoker
78ddb46066
Quick sort with lomuto partition (#3875)
* add quick sort algorithm with Lomuto partition

* fix(lomuto_partition): fix snake_case
2021-02-17 15:28:50 +01:00
Lewis Tian
e166350509
Update sorts/quick_sort_3_partition.py (#2507)
* 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 <cclauss@me.com>

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-29 13:55:48 +02:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Christian Clauss
47a9ea2b0b
Simplify code by dropping support for legacy Python (#1143)
* Simplify code by dropping support for legacy Python

* sort() --> sorted()
2019-08-19 15:37:49 +02:00
Alex Brown
91fccecb56 snake_case all the things 2018-10-19 17:14:25 -05:00