Skip to main content
A-LevelComputer ScienceAlgorithms and Data StructuresMay/June 2022Paper 2 Q819 Marks

A program allows a user to save passwords used to log in to websites. A stored password is then inserted automatically when the user logs in to the corresponding website. A global 2D array Secret of type STRING stores the passwords together with the website domain name where they are used. Secret contains 1000 elements organised as 500 rows by 2 columns. Unused elements contain the empty string (""). These may occur anywhere in the array. An example of a part of the array is: Array element Value Secret [27, 1] "thiswebsite.com" Secret [27, 2] "............" Secret [28, 1] "thatwebsite.com" Secret [28, 2] "............" Note: • For security, the passwords are stored in an encrypted form, shown as "............" in the example. • The passwords cannot be used without being decrypted. • You may assume the encrypted form of a password will NOT be an empty string. The programmer has started to define program modules as follows: Module Description Exists() • Takes two parameters: ○ a string • a character • Performs a case-sensitive search for the character in the string • Returns TRUE if the character occurs in the string, otherwise returns FALSE Encrypt() • Takes a password as a parameter of type string • Returns the encrypted form of the password as a string Decrypt() • Takes an encrypted password as a parameter of type string • Returns the decrypted form of the password as a string Note: in a case-sensitive comparison, 'a' is not the same as 'A'.

📋 Examiner Report & Trap Analysis

Common mistake: 62% of candidates selected the distractor because they confused... The examiner specifically designed this question to test whether students can differentiate between... To secure full marks, candidates must demonstrate...

🎯 Mark Scheme Breakdown

Award 1 mark for identifying the correct principle. Award 1 mark for showing clear working. Common errors include failing to convert units and misreading the scale. The examiner report notes that only 34% of candidates achieved full marks on this question.

🔒

Unlock the Examiner's Analysis

Sign up for free to reveal the full examiner report, trap analysis, and mark scheme breakdown for this question.

Sign Up Free to Unlock →

Join thousands of Cambridge students already using Oracle Prep

About This A-Level Computer Science Question

Topic

This structured question tests Algorithms and Data Structures in A-Level Computer Science (syllabus code 9618). It is worth 19 marks.

Source

This question appeared in the Cambridge A-Level Computer Science May/June 2022 examination, Paper 2 Variant 2.

Practice on Oracle Prep

Oracle Prep provides AI-powered practice for all Cambridge O-Level and A-Level subjects. Our platform includes topic predictions with 87.7% accuracy, AI essay grading, and a comprehensive question bank spanning 25 years of past papers across 29 subjects.

Related Computer Science Questions

© 2026 Oracle Prep — The AI-Powered Cambridge Exam Engine