OCR MEI D1 2006 January — Question 2

Exam BoardOCR MEI
ModuleD1 (Decision Mathematics 1)
Year2006
SessionJanuary
TopicSorting Algorithms

  1. Complete the table in the insert showing the outcome of applying the algorithm to the following two lists: $$\begin{array} { l r l l l l l } \text { List 1: } & 2 , & 34 , & 35 , & 56 & &
    \text { List 2: } & 13 , & 22 , & 34 , & 81 , & 90 , & 92 \end{array}$$
  2. What does the algorithm achieve?
  3. How many comparisons did you make in applying the algorithm?
  4. If the number of elements in List 1 is \(x\), and the number of elements in List 2 is \(y\), what is the maximum number of comparisons that will have to be made in applying the algorithm, and what is the minimum number?