Код: Выделить всё
def quicksort(arr):
if len(arr) = pivot]
return quicksort(left) + [pivot] + quicksort(right)
arr = [10, 2, 30, 5, 7]
print(quicksort(arr))
Подробнее здесь: https://stackoverflow.com/questions/795 ... ck-sort-al
Код: Выделить всё
def quicksort(arr):
if len(arr) = pivot]
return quicksort(left) + [pivot] + quicksort(right)
arr = [10, 2, 30, 5, 7]
print(quicksort(arr))