2025 ASRJC H2 Computing Prelim Theory P1
Uploaded by Randomguy123456788 · 3 September 2025
Preview
1 [Turn over COMPUTING 9569/01 Paper 1 Written 22 August 2025 (Friday) 8 – 11 am 3 hours READ THESE INSTRUCTIONS FIRST An answer booklet will be provided with this question paper. You should follow the instructions on the front cover of the answer booklet. If you need additional answer paper ask the invigilator for a continuation booklet. Answer all questions. Approved calculators are allowed. The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 100. This document consists of 6 printed pages and 2 blank pages. Anderson Serangoon Junior College ANDERSON SERANGOON JUNIOR COLLEGE JC2 Preliminary Examination 2025 Higher 2
2 1 Below shows a pseudocode of insertion sort with blanks. PROCEDURE InsertionSort(A : ARRAY[0 : N - 1] OF INTEGER) // using 0-indexing FOR i ← ……(1)…… TO ……(2)…… temp ← A[i] j ← ……(3)…… WHILE j >= 0 AND temp < ……(4)…… ……(5)…… ← A[j] j ← ……(6)…… ENDWHILE ……(7)…… ← temp NEXT i ENDPROCEDURE (a) Write your answer for each blank (1) through (7) clearly. [3] (b) State the worst-case time complexity of insertion sort and briefly explain what that implies. [2] (c) Insertion sort is effective for small arrays due to its simplicity and low overhead. However, for larger arrays, more efficient algorithms such as merge sort are preferred. Describe how merge sort works and state its time complexity. [3] 2 (a) State what is meant by data integrity. [1] Sonars Service Centre handles repairs of their proprietary Sonars audio products. When customers bring equipment for repair, technicians would need to enter the product serial number into the system. Each serial number consists of 10 digits, where the last digit is a check digit calculated using this algorithm: 1. In the first pass, multiply each of the first 9 digits of the serial number by weights: 9, 8, 7, 6, 5, 4, 3, 2, 1 respectively (e.g. position 1 gets weight 9). Sum these products to obtain subtotal. 2. In the second pass, using the same 9 digits of the serial number, multiply each digit by the sum of its own value and its position number (e.g. if the first digit is 5, we get a product of 5 x (5 + 1) = 30 for that digit). Sum these products to obtain another subtotal. 3. Add the two subtotals from the two passes to obtain a combined total. 4. Divide the combined total by 13 to obtain the remainder. Subtract the remainder from 13 to derive the check digit. (b) (i) It is given that 284736197X is a valid serial number, where X represents the check digit. Calculate the value of X, showing your workings. [3] (ii) Briefly explain why check digit alone is insufficient to ensure data integrity. [1] (iii) Describe two data
Content continues in the PDF.
Related notes
- VJC Chapter 21 SQLite with PythonNotes/Practices · 2025
- VJC Chapter 23 Web Applications PrinciplesNotes/Practices · 2025
- VJC Chapter 10 RecursionNotes/Practices · 2025
- VJC Chapter 20 SQLNotes/Practices · 2025
- VJC Chapter 16 Hash TableNotes/Practices · 2025
- VJC Chapter 22 NoSQLNotes/Practices · 2025

