Free until 14 Nov · 80% off for the first 100 · Pricing

Computer Science 9618/22 May/June 2026: question paper and mark scheme

Cambridge AS & A Level Computer Science (9618), Paper 2 Fundamental Problem-solving and Programming Skills, May/June 2026. Read both free below, or download them. Done the paper? Get it marked by AI against this mark scheme.

9618_s26_qp_229618_s26_ms_229618/22/M/J/26

Paper
Paper 2 Fundamental Problem-solving and Programming Skills
Total marks
75
Time
2 hours
Code on the paper
9618/22/M/J/26
9618_s26_ms_22.pdf

9618/22 mark scheme, question by question

Each question as it's printed, and the mark scheme's points for it, as text. Diagrams, tables and graphs are in the PDFs above.

Question 1

Question

In the question paper above.

Mark scheme

1(a)(i) STRING 1 1(a)(ii) IF LENGTH(Pass) < 6 OR LENGTH(Pass) > 8 / >= 9 2 THEN Mark as follows: 1 Mark: Use of LENGTH function twice 1 Mark: Number 8 used in second condition 1(a)(iii) Mark as follows: 7 1 DECLARE LetterFlag, DigitFlag: BOOLEAN 1 mark for BOOLEAN 2 LetterFlag ← FALSE 1 mark for FALSE 3 FOR Index ← 1 TO LENGTH(Pass) 1 mark for LENGTH 4 Character ← MID(Pass, Index, 1) 1 mark for MID, Index and 1 5 IF IS_NUM(Character) = TRUE THEN 1 mark for IS_NUM 6 DigitFlag ← TRUE ELSE LetterFlag ← TRUE 1 mark for both variables being set to TRUE 7 IF NOT(LetterFlag AND DigitFlag) THEN 1 mark for NOT 1(b)(i) One mark per state 2 Example answers: 1 Sensor activated (mode) / / Intruder/movement detected (mode) // Alert Mode 2 Alarm sounding // Light flashing (mode) // Alarm activated 3 Error mode // Power loss detected (mode) // Battery too low mode 4 Tamper detected (mode) // Lockdown (mode) 5 Disarm Mode // Maintenance Mode // Password Change Mode // Service Mode Max 2 Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(b)(ii) One mark per event 3 Do not accept repeating Example answers: examples in stem. 1 Movement / pressure (detected) Reject Turning 2 Window opened / broken (detected) system on. Reject 3 Door open (detected) reference to 4 Entering wrong password (repeatedly) creating password. 5 Entering password to enter / exit maintenance mode / silence alarm 6 Tampering / damaging alarm (system) 7 Time delay // Time passed after alarm triggered / before alarm activated 8 Battery charge too low 9 Pressing panic button Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(c) Example Solution 3 Do not accept once if lower-case letters or rule being example of test reason for invalid test characters that are tested data data not letters or digits rule 1 1A password is too short used. rule 1 PHRASE345678 Password too long rule 2 ABCDEF Does not contain a digit rule 2 1234567 Does not contain a letter rule 3 PASSWRD2 letters are repeated rule 3 ABCDEF11 Digits / Numbers are repeated rule 3 AAA111 Both digits and letters are repeated Accept Characters repeated Mark as follows: Rule 1 test: 1 mark for one example of test data for rule 1 and appropriate reason Test data A string of more than 8 characters that contains both letters and digits. Reject if test data breaks Rule 2 The letters must be upper case or/and Rule 3 Each character only occurs once Reason Password is too long Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(c) Rule 2 test (1 mark): 1 mark for two examples of test data that only breaks rule 2 and appropriate reasons. Test data A string between 6 and 8 characters long Reject if letters that contains no digits repeated Reason Does not contain a digit Test data A string between 6 and 8 characters long that contains no letters Reason Does not contain a letter Reject if digits repeated Rule 3: 1 mark for two examples of test data for rule 3 and appropriate Reject characters reasons repeated Test data A string between 6 and 8 characters long where only digits are repeated Reason Digits are repeated Test data A string between 6 and 8 characters long where both characters and digits are Reject if letters repeated repeated Reject if no letters Reason Both digits and letters are repeated 1(d) One mark per example 3 Example answers: 1 Structure chart // Problem / Program broken into modules // Reject Modular Diagram ‘Decomposition’ by itself 2 Flowchart Reject Module 3 Data Flow Diagram Overview by itself 4 Identifier / Variable table // Data structure / Record structure (designs) 5 File structure // Database Design 6 E-R Diagram 7 HCI Design // Report Design 8 Class Diagram // UML Diagram 9 Programming language to use Max 3 Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 1(e) One mark per stage 2 1 Analysis 2 Coding // Implementation NE Development / Programming 3 Maintenance Max 2 marks 1(f)(i) Integration 1 1(f)(ii) One mark for the name, one for the description 3 Method: Stub (testing) Description: 1 A simple / dummy module is written to replace the module Do not mark (that is not working) description if 2 The simple / dummy module will return an expected value / method incorrect will output a message (to show the module has been called)

Question 2

Question

In the question paper above.

Mark scheme

2(a) One mark for either explanation: 1 • To filter out information / data that is not necessary for the task • To keep only information / data that is necessary for the task Max 1 mark 2(b) One mark for each TWO data items 2 Reject Quantity Reject Return date Example answers if Hire date already 1 Tool ID // Tool name // Type of tool given 2 Customer ID // Customer name // Customer address // MP 2 Reject just Account reference ‘Customer’ 3 Hire ID 4 (Hire) Date 5 Hire time 6 Length of hire: Full or Half day 7 Cost of hire 8 Payment details 9 Tool status Max 2 marks Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 2(c) One mark for each process. 2 Examples include: 1 Input customer details / customer ID / payment details / Tool ID 2 Search for required tool // Checking if tool returned // Checking if tool available // Searching for dates when tool is available 3 Record tool booking // Amend Tool booking // Create tool booking // Record when tool returned // Confirm booking 4 Calculating time when tool has to be returned 5 Change / check tool status e.g. hired / available / damaged // Prevent same tool being hired twice 6 Process payment / calculate hire cost Max 2 marks

Question 3

Question

In the question paper above.

Mark scheme

3 Example solution 6 MP 1 cannot be in a loop structure Mark points: MP 1 (Step 4) Open WordList.txt / File in read mode (and Do not accept subsequently close) once if MP 2, 3, 4 MP 2 (Step 5) Read the next line from the file is clearly not in a in a loop loop MP 3 (Step 6) Increment line counter Award only one in a loop mark for MP 5 and MP 4 (Step 7) Check if the line read equals the word (input) MP 6 if both in a loop outputs are MP 5 (Step 8) ...If it does output line counter possible MP 6 (Step 9) If word not found in file then output "Not Found" after all iterations MP 7 Can be any MP 7 (Step 10) Otherwise repeat from step 5 loop but it must be clear where it Max 6 marks from 7 possible marks starts and ends and must include at least one of the end conditions. Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/

Question 4

Question

In the question paper above.

Mark scheme

4(a) After group 1 6 back stack forward stack www.bbb.home ← TOS www.333.corp www.111.home www.aaa.home ← TOS www.999.corp www.ccc.my www.222.me Web address currently displayed in the browser: www.zzz.corp After group 2 back stack forward stack www.333.corp ← TOS www.zzz.corp ← TOS www.111.home www.aaa.home www.999.corp www.ccc.my www.222.me Website displayed in the browser: www.bbb.home After group 3 back stack forward stack www.111.home ← TOS www.333.corp www.bbb.home www.zzz.corp www.aaa.home www.ccc.my www.222.me ← TOS Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 4(a) Website displayed in the browser: www.999.corp Mark as follows: Group 1 1 1 mark for back stack as shown and TOS position as shown on both stacks 2 1 mark for forward stack as shown and current web address Group 2 3 1 mark for stacks and correct TOS pointers as shown and current web address Group 3 4 1 mark for back stack as shown and TOS as shown 5 1 mark for forward stack as shown and TOS as shown 6 1 mark current web address 4(b) One mark for identifying an ADT. 3 Queue / Linked List One mark per feature Features of a Queue: 1 1 Each queue element contains one data item 2 A front/start pointer and a rear/end pointer 3 Data is added at back / end and removed from front / start // works on a FIFO basis 4 Can be circular or linear Need both MAX 2 marks for features Features of a Linked List: 1 1 Each node / item contains data and a pointer (to the next Reject use of 2 node/item) arrays 2 A pointer to the start of the list 3 Last node in the list has a null pointer 4 Data may be added / removed by manipulating pointers 5 Pointers are followed to move through nodes in the list (in a given sequence) 6 Unused nodes are stored on a free list // a free-list pointer to the Free List 7 Is a dynamic (data structure) MAX 2 marks for features Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/

Question 5

Question

In the question paper above.

Mark scheme

5(a) The greater than logic operator / > in the selection statement 1 would need to be changed to a less than operator / < Or by example IF Numbers[Index] > Numbers[Index + 1] THEN would be changed to IF Numbers[Index] < Numbers[Index + 1] THEN OR IF Numbers[Index] <= Numbers[Index + 1] THEN OR IF Numbers[Index + 1] > Numbers[Index] THEN OR IF Numbers[Index + 1] >= Numbers[Index] THEN 5(b)(i) 4 Reject answers 2 marks for inner loop that just repeat the algorithm MP 1: The inner loop iterates one less time (in algorithm B) each time the outer / repeat loop iterates. Reject program stops rather than MP 2: this is because for each iteration of the outer / repeat iteration ends or loop (in algorithm B) the last / one more element in the algorithm ends Numbers array will be in the correct place. 2 marks for outer loop MP 3: The outer / repeat loop (in algorithm B) would stop iterating if no swaps are made / all numbers in array are sorted MP 4: so not as many iterations would be needed (if the Numbers array is not initially sorted) 5(b)(ii) 1 mark: When Numbers (array) / array is already in (ascending) 1 order / sorted 5(c)(i) 1 mark: The parameters / Num1 and Num2 are passed by value 2 / BYVAL // The parameters / Num1 and Num2 are not passed / should be passed by reference / BYREF 1 mark: (The swap made inside) the procedure does not change the arguments used /parameters (passed) / the values stored in the Numbers elements passed // The procedure does not swap / change the values stored in the array Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 5(c)(ii) Solution 2 NE for header mark If ByRef is PROCEDURE Swap(BYREF Num1, Num2 : INTEGER) mentioned in the DECLARE Temp : INTEGER header but syntax Temp ← Num1 is not correct but Num1 ← Num2 allow FT for Num2 ← Temp second mark ENDPROCEDURE 2 marks: code as above 1 mark: just the procedure header as above Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/

Question 6

Question

In the question paper above.

Mark scheme

6(a) Mark Schme One – loop used to form return string 8 (See MS Two for solutions using LEFT()/MID() to form return string) Example solution FUNCTION AddPadding() RETURNS STRING CONSTANT Space = ' ' DECLARE Plaintext : STRING DECLARE LenOfPlaintext : INTEGER DECLARE Index : INTEGER REPEAT OUTPUT "Enter plaintext" INPUT Plaintext LenOfPlaintext ← LENGTH(Plaintext) UNTIL LenOfPlaintext >= 1 AND LenOfPlaintext <= 25 FOR Index ← LenOfPlaintext + 1 TO 25 Plaintext ← Plaintext & Space NEXT Index // Alternative way to append spaces using while loop WHILE LENGTH(Plaintext) <> 25 Plaintext ← Plaintext & Space ENDWHILE //Alternative way to append spaces DECLARE SpaceString : STRING SpaceString ← "" FOR Index ← LenOfPlaintext + 1 TO 25 SpaceString ← SpaceString & Space NEXT Index Plaintext ← Plaintext & SpaceString RETURN Plaintext ENDFUNCTION Mark points 1 Function heading, return type and ending 2 Prompt for and input of plaintext MP 4 Must be a 3 Conditional loop that checks one of the boundary values conditional loop 4 Conditional loop that correctly checks both boundaries of If no loop used plaintext then MP3, MP4 5 …Re-input of plaintext in a loop and MP5 can not 6 Loop that iterates for number of spaces to add to end of be given plaintext 7 …Spaces appended to plaintext // Spaces appended to an empty string 8 Correctly padded plaintext returned following a reasonable attempt at MP7 Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 6(a) Mark Scheme Two - No Loop used to form return string – use of LEFT()/MID() Function Example Solution: FUNCTION AddPadding() RETURNS STRING CONSTANT Fill = " " //24 Spaces DECLARE Plaintext : STRING DECLARE LenOfPlaintext : INTEGER DECLARE Index : INTEGER REPEAT OUTPUT "Enter plaintext" INPUT Plaintext LenOfPlaintext ← LENGTH(Plaintext) UNTIL LenOfPlaintext >= 1 AND LenOfPlaintext <= 25 Plaintext ← LEFT(Plaintext & Fill, 25) RETURN Plaintext ENDFUNCTION Mark points 1 Function heading, return type and ending 2 Prompt for and input of plaintext 3 Conditional loop that checks one of the boundary values Conditional loop that correctly checks for length of plaintext 4 …Re-input of plaintext in a loop 5 Use of string of at least 24 spaces Correct use of LEFT() / MID() function and & to append padding characters Do not accept use 6 Correctly padded plaintext returned following a reasonable of language attempt at specific string MP 6 and MP 7 manipulation which is not the compatible with the pseudocode used for the syllabus Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 6(b)(i) Solutions: 2 • Grid : ARRAY[1 : 5, 1 : 5] OF CHAR • Grid : ARRAY[0 : 4, 0 : 4] OF CHAR 1 mark for boundaries of both array dimensions: • [1 : 5, 1 : 5] Reject use of • [0 : 4, 0 : 4] different brackets eg ( ) 1 mark for all other parts of declaration Reject CHARACTER instead of CHAR Reject STRING instead of CHAR Must be as exactly as above but accept use of lowercase Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 6(b)(ii) Solution One : Using nested loop and output of each row in a 8 loop following nested loop Example Solution PROCEDURE PopulateGrid(Plaintext : STRING) DECLARE Row, Column, Index : INTEGER Index ← 1 FOR Row ← 1 TO 5 FOR Column ← 1 TO 5 Grid[Row, Column] ← MID(Plaintext, Index, 1) Index ← Index + 1 NEXT Column Next Row FOR Row ← 1 TO 5 OUTPUT Grid[Row, 1], Grid[Row, 2], Grid[Row, 3],_ Grid[Row, 4], Grid[Row, 5] NEXT Row ENDPROCEDURE Mark Points 1 Generate Index, 1 to 25, used to extract all characters from Plaintext 2 Generate both Row and Col in a loop 3 Extract an individual character from Plaintext in a loop Syntax for MID() 4 Attempt to assign the extracted character to Grid in a function must use loop parameters of correct type – 5 Extraction and assignment of all 25 characters in allow other string Plaintext to Grid in a loop handling function combinations if they work. 6 Attempt to identify / isolate 5 characters comprising at least one row Max 7 if Procedure heading/parameter 7 Identify / isolate all 5 characters for all 5 rows type incorrect Penalise incorrect 8 Output all five rows of GRID, each on a separate line syntax for indexes i.e. [Row][Col] instead once. Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 6(b)(ii) Solution Two: Using nested loop and output of each string in a loop following nested loop - Example Solution PROCEDURE PopulateGrid(Plaintext : STRING) DECLARE Row, Column, Index : INTEGER DECLARE RowString : STRING FOR Row ← 1 TO 5 FOR Column ← 1 TO 5 Index ← (Row – 1) * 5 + Column Grid[Row, Column] ← MID(Plaintext, Index, 1) NEXT Column NEXT Row FOR Row ← 1 TO 5 RowString ←"" For Col ← 1 TO 5 RowString ← RowString & Grid[Row, Column] Next Col OUTPUT RowString NEXT Row ENDPROCEDURE Solution Three: Using nested loop where output string is formed in the inner loop and output in string in the outer loop – complex use of Index. No additional loop after nested loop Example Solution PROCEDURE PopulateGrid(Plaintext : STRING) DECLARE Row, Column, Index : INTEGER DECLARE RowString : STRING FOR Row ← 1 TO 5 RowString ← "" FOR Column ← 1 TO 5 Index ← (Row – 1) * 5 + Column Grid[Row, Column] ← MID(Plaintext, Index, 1) RowString ← RowString & MID(Plaintext, Index, 1) NEXT Column OUTPUT RowString NEXT Row ENDPROCEDURE Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/ 6(b)(ii) Solution Four: No nested loop Example Soution PROCEDURE PopulateGrid(Plaintext : STRING) DECLARE Row, Column, Index : INTEGER Row ← 1 Col ← 0 FOR Index ← 1 TO 25 IF Index MOD 5 = 0 THEN Row ← Row + 1 Col ← 0 ENDIF Col ← Col + 1 Grid[Row, Column] ← MID(Plaintext, Index, 1) NEXT Index FOR Row ← 1 TO 5 OUTPUT Grid[Row, 1], Grid[Row, 2],_ Grid[Row, 3], Grid[Row, 4], Grid[Row, 5] NEXT Row ENDPROCEDURE Trace ID: PC-95C57C5F77 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge Downloaded from PapaCambridge - https://papacambridge.com/

Checked your answers against these? Let AI mark the whole paper, on your own working.

Mark my 9618/22

How this paper is marked

Examiners follow the generic marking principles at the front of the scheme, then each question's points: method (M), accuracy (A) and independent (B) marks, error carried forward where the scheme allows it, and positive marking, so you're credited for what you got right.

Check your answers against it

Done this paper? Upload your script and CIE Buddy's AI marker marks it question by question against this exact scheme, puts the ticks on your own working and says what each lost mark needed.

9618/22 in other series

Find another Computer Science paper

Every AS & A Level Computer Science mark scheme

Question papers and mark schemes © Cambridge University Press & Assessment. CIE Buddy is independent and not connected to Cambridge.

9618/22 questions

Where can I find the 9618/22 May/June 2026 mark scheme?

On this page, free: the mark scheme for AS & A Level Computer Science 9618/22, May/June 2026 (9618_s26_ms_22), and the question paper (9618_s26_qp_22), to read or download, with each question's marking points written out underneath.

How many marks is 9618/22 out of?

Computer Science 9618/22 for May/June 2026 is out of 75 marks, with 2 hours to answer it.

Can I get my 9618/22 answers marked?

Yes. Upload your answers to 9618/22/M/J/26 as a PDF or photos, and CIE Buddy marks every question against this paper's official mark scheme, using Cambridge's marking rules. You get your score, each lost mark explained on your own script, and the topics to revise. It's a guide, not an official Cambridge grade.