Ctrl/Cmd + P and select "Save as PDF".
if p < r q = Partition(A, p, r) Quicksort(A, p, q) Quicksort(A, q+1, r)
x = A[r] // Pivot
i = p - 1
for j = p to r - 1
if (A[j] <= x) {
i = i + 1
swap A[i] with A[j]
}
swap A[i+1] with A[r]
return i + 1x = A[p] // Pivot
i = p - 1
j = r + 1
while (i < j){
while (A[i] < x) i += 1;
while (A[j] > x) j -= 1;
if (i < j) {
swap A[i] with A[j];
i += 1;
j -= 1;
}
}
return j;