AQA D1 2010 January — Question 2

Exam BoardAQA
ModuleD1 (Decision Mathematics 1)
Year2010
SessionJanuary
TopicSorting Algorithms

2
  1. Use a bubble sort to rearrange the following numbers into ascending order. $$\begin{array} { l l l l l l l l } 13 & 16 & 10 & 11 & 4 & 12 & 6 & 7 \end{array}$$
  2. State the number of comparisons and the number of swaps (exchanges) for each of the first three passes.