Skip to main content
O-LevelComputer ScienceAlgorithm design and problem-solvingOct/Nov 2024Paper 2 Q48 Marks

This pseudocode algorithm is intended to sort a pre-populated one-dimensional (1D) array named ItemList into alphabetical order using a bubble sort. 01 DECLARE ItemList : ARRAY[1:100] OF STRING 02 DECLARE Counter : STRING 03 DECLARE Limit : INTEGER 04 DECLARE Pass : INTEGER 05 DECLARE Swapped : BOOLEAN 06 DECLARE Temp : STRING 07 Limit ← 100 08 Pass ← 1 09 Temp ← TRUE 10 WHILE Swapped = TRUE OR Pass <= Limit - 1 DO 11 Swapped ← FALSE 12 FOR Counter ← 1 TO Limit - Pass 13 IF ItemList[Counter] > ItemList[Counter + 1] 14 THEN 15 Temp ← ItemList[Counter] 16 ItemList[Counter] ← ItemList[Counter + 1] 17 ItemList[Counter + 1] ← Temp 18 Swapped ← TRUE 19 ENDCASE 20 Pass ← Pass + 1 21 NEXT Counter 22 ENDWHILE

✓ Correct Answer

The correct answer is . This question tests the candidate's understanding of algorithm design and problem-solving within the Computer Sciencesyllabus. The examiner's mark scheme requires...

📋 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...

🔒

Unlock the Examiner's Answer

Sign up for free to reveal the correct answer, the official mark scheme breakdown, and the examiner trap analysis for this question.

Sign Up Free to Unlock →

Join thousands of Cambridge students already using Oracle Prep

About This O-Level Computer Science Question

This structured question appeared in the Cambridge O-Level Computer Science (2210) Oct/Nov 2024 examination, Paper 2 Variant 2. It tests the topic of Algorithm design and problem-solving and is worth 8 marks.

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.

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