mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
small change!
This commit is contained in:
parent
ca7eb46756
commit
31f968f589
|
@ -1,13 +1,11 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
def quick_sort_3partition(sorting, left, right):
|
def quick_sort_3partition(sorting, left, right):
|
||||||
|
|
||||||
if right <= left:
|
if right <= left:
|
||||||
return
|
return
|
||||||
a = left
|
a = i = left
|
||||||
b = right
|
b = right
|
||||||
pivot = sorting[left]
|
pivot = sorting[left]
|
||||||
i = left
|
|
||||||
while i <= b:
|
while i <= b:
|
||||||
if sorting[i] < pivot:
|
if sorting[i] < pivot:
|
||||||
sorting[a], sorting[i] = sorting[i], sorting[a]
|
sorting[a], sorting[i] = sorting[i], sorting[a]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user