procedure quickSort( A : list of sortable items, low : pointer to starting index in A , high : pointer to ending index in A ) if low < high pp = partition(A,low,high) quicksort(A,low,pp-1) quicksort(A,pp+1,high) end if procedure partition( A : list of sortable items, low : pointer to starting index in A , high : pointer to ending index in A ) set pivot to the value at index high set splitIndex to low-1 for j = low to high-1 inclusive do if A[j] < pivot: splitIndex = splitIndex+1 swap A[splitIndex] with A[j] end if end for swap A[splitIndex+1] with A[high] return splitIndex +1 end procedure