On page 66 there is a high-level description of the quicksort algorithm.
(a) Write down the pseudocode for quicksort.
(b) Show that its worst-case running time on an array of size $n$ is $\Theta\left(n^{2}\right)$
(c) Show that its expected running time satisfies the recurrence relation
\[
T(n) \leq O(n)+\frac{1}{n} \sum_{i=1}^{n-1}(T(i)+T(n-i))
\]
Then, show that the solution to this recurrence is $O(n \log n)$.