Question 2(b)(i) 2010 · May-June · Paper 33 · 5 marks
Reveal official mark-scheme answer

Official answer for Question 2
Part (b)
(i)
Part (b)
(i)
-Read record from A, Read record from B
- If A<B Then copy A to T and Read next record from A
- Else copy B to T and Read next record from B
- Until A or B has no more records
- If A is empty copy remaining records from B to T
- Else copy remaining records from A to T
Question 33
Show text version of question
Question 2
Part (b)
(i)
Question 2
A company uses a computerised payroll system. The company has two factories and employees
only work in one of the factories. Each factory employs a large number of workers. Details of the work done by employees each week is stored serially in two transaction files, one for each factory. When these files are used to create the payroll at the end of the week they have to be merged into a single, sequential file. The final transaction file (T) is the result of merging the two sorted files from the two factories (A and B).
(i)
Describe an algorithm that will merge A and B to form T.
Why this question appears here
75% assigned-topic match · Programming › Constructs
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s10_qp_33.pdf
