mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Update quick_sort.py
This commit is contained in:
parent
40a4976c5f
commit
ee9384b374
@ -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…
x
Reference in New Issue
Block a user