AQA D1 2008 June — Question 2

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

2
  1. Use a quick sort to rearrange the following letters into alphabetical order. You must indicate the pivot that you use at each pass.
    P
    B
    M
    N
    J
    K
    R
    D
    (5 marks)
    1. Find the maximum number of swaps needed to rearrange a list of 8 numbers into ascending order when using a bubble sort.
      (1 mark)
    2. A list of 8 numbers was rearranged into ascending order using a bubble sort. The maximum number of swaps was needed. What can be deduced about the original list of numbers?
      (1 mark)