QuickSort Algorithm (Python) This is my implementation of Quick Sort Algorithm :
def quick_sort(sequence):
    if len(sequence)&lt;= 1:
        return sequence
    else:
        pivot = sequence.pop() # To take the last item of &quot;sequence&quot; list
    
    greater =[]  
    lower = []
       
    for n in sequence:
        if n &gt; pivot : 
            greater.append(n)
        else:
            lower.append(n)

&quot;&quot;&quot; return the quiqk sorted &quot;lower&quot; and &quot;greater&quot; lists ,and pivot as a list in between &quot;&quot;&quot;
    return quick_sort[lower] + [pivot] + quick_sort[greater]


How can I improve it ?
The main single advantage of quicksort is that it sorts in-place. Your implementation does not. It requires an additional memory for left and right lists, linear in terms of the initial array length.
Returning the concatenation of the three lists also doesn't help performance.
An obvious improvement is to reimplement it in-place.