Question 1 Report
The election office sorts candidate names alphabetically before ballot papers are checked. Fig. 1 shows a merge-sort operation on two sorted lists of names. The comparison uses the first letter where all names have different initial letters.
(a) State the first name copied to the output array. [1]
(b) Give the next two names copied. [2]
(c) Give the complete alphabetically sorted output list. [3]
(d) State the comparison made after Amin has been copied. [1]
(e) Explain why the merge operation does not need to compare Amin with every name in List B. [2]
(f) Give one reason a computer may sort names before printing ballot papers. [1]
When merging alphabetically sorted lists, compare only the first unmerged name in each list. Here, the initial letters are all different, so alphabetical order is determined by those letters.
Everything you need to excel in your exams