mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-07-03 19:16:51 -04:00
Update quick_sort.py
This commit is contained in:
parent
40a4976c5f
commit
ee9384b374
1 changed files with 0 additions and 2 deletions
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
|
|
||||||
def quick_sort_partition(array):
|
def quick_sort_partition(array):
|
||||||
"""Sort an array using quick sort"""
|
|
||||||
|
|
||||||
pivot, array = array[0], array[1:]
|
pivot, array = array[0], array[1:]
|
||||||
|
|
||||||
|
@ -15,7 +14,6 @@ def quick_sort_partition(array):
|
||||||
|
|
||||||
|
|
||||||
def quick_sort_divided(array):
|
def quick_sort_divided(array):
|
||||||
"""Sort an array using quick sort"""
|
|
||||||
|
|
||||||
if len(array) < 2:
|
if len(array) < 2:
|
||||||
return array
|
return array
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue