while left <= right:
    while array[left] < pivot:
        left += 1
while array[right] > pivot:
    right -= 1
if left <= right:
    array[left], array[right] = array[right], array[left]
left += 1
right -= 1
_quicksort(array, start, right)
_quicksort(array, left, stop)
Quicksort implementation in Python