Quicksort 1 - Partition

  • + 0 comments

    python3:

        left = []
    right = []
    equal = [arr[0]]
    for i in range(1,len(arr)):
        if arr[i] > arr[0]:
            right.append(arr[i])
        else:
            left.append(arr[i])
    x = left + equal + right
    return x