AQA D1 2006 June — Question 2

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

2
  1. Use a shuttle sort to rearrange the following numbers into ascending order. $$\begin{array} { l l l l l l l l } 18 & 2 & 12 & 7 & 26 & 19 & 16 & 24 \end{array}$$
  2. State the number of comparisons and swaps (exchanges) for each of the first three passes.