2 A student is using a quicksort algorithm to rearrange a set of numbers into ascending order. She uses the first number in each list (or sublist) as the pivot.
Her correct solution for the first three passes is as follows.
| Initial list | 10 | 7 | 4 | 22 | 13 | 16 | 19 | 5 |
| After 1st pass | 7 | 4 | 5 | 10 | 22 | 13 | 16 | 19 |
| After 2nd pass | 4 | 5 | 7 | 10 | 13 | 16 | 19 | 22 |
| After 3rd pass | 4 | 5 | 7 | 10 | 13 | 16 | 19 | 22 |
- State the pivots used for the 2nd pass.
- Write down the number of comparisons on each of the three passes.
- Explain whether the student has completed the algorithm.