Hello @DanielFischer!!!
I want to explain why the execution time of partition at an array of length n is $\Theta(n)$. That is the function partition:
partition(A,p,r){
x<-A[r]
i<-p-1
for j<-p to r-1
if A[j]<=x then
i<-i+1
swap(A[i],A[j])
swap(A[i+1],A[r])
return i+1