OCR FD1 AS 2017 December — Question 6

Exam BoardOCR
ModuleFD1 AS (Further Decision 1 AS)
Year2017
SessionDecember
TopicSorting Algorithms

6 This list is to be sorted into decreasing order, ending up with 31 in the first position and 4 in the last position.
15
4
12
23
14
16
27
31 Initially bubble sort is used.
  1. Record the list at the end of the first, second and third passes. You do not need to show the individual swaps in each pass. After the fourth pass the list is:
    23
    15
    16
    27
    31
    14
    12