AQA D1 2013 June — Question 2

Exam BoardAQA
ModuleD1 (Decision Mathematics 1)
Year2013
SessionJune
TopicSorting Algorithms

2
  1. Use the quicksort algorithm to rearrange the following numbers into ascending order, showing the new arrangement after each pass. You must indicate the pivot(s) being used on each pass. $$2 , \quad 12 , \quad 17 , \quad 18 , \quad 5 , \quad 13$$
  2. For the first pass, write down the number of comparisons.