Algorithm design and problem-solving — IGCSE Computer Science (0478) questions by topic
Algorithm design questions ask candidates to complete the description of abstraction, trace flowcharts that fail on a specific input, identify whether an algorithm performs a linear search or a bubble sort, and describe the purpose of validation checks such as double entry. Complete, identify, state, describe and write are the command words, with describe expecting the algorithm's purpose explained in context, not just its steps repeated.
43 real questions from 2023 to 2025 papers form this page, worth 1 to 16 marks. Trace tables are unforgiving of a single missed step, so submitting your completed traces and flowchart descriptions for instant marking helps you catch an uninitialised counting variable or a misread output before the same habit affects several questions.
What examiners look for
- A recurring mistake is not initialising totalling or counting variables in a trace table, and adding incorrect punctuation to the output, or not copying the output correctly from the flowchart.
- Examiners also flag incorrectly identifying a flowchart as a linear search rather than recognising it as a bubble sort, giving type check or presence check where a different validation was needed, and not mentioning that validation is an automatic check carried out by the computer.
- Many candidates achieved full or near full marks, describing an algorithm as adding together a batch of numbers and outputting the total and average.
- Strong answers most commonly identified double entry check correctly and initialised the pointer before tracing the loop correctly.
- Reports praise candidates who identified that an algorithm would go into an endless loop, continually adding 1 to the pointer.
May–June 2025, Paper 21
Tick (✓) one box to identify the type of test to only check for the largest or smallest acceptable value. A normal test data B abnormal test data C extreme test data D boundary…
Answer this question and get it marked →Four requirements for validating inputs and five types of validation check are given. Draw one line from each requirement to the most appropriate validation check. Not all…
Answer this question and get it marked →The flowchart represents an algorithm to calculate grades. Complete the trace table for the algorithm, using the input data: 21, 46, 63, 91, 12 Score Grade OUTPUT --- --- ---
Answer this question and get it marked →May–June 2025, Paper 22
Tick (✓) one box to complete the description of abstraction. Abstraction is part of the analysis stage of the development life cycle. Abstraction means A testing the solution to…
Answer this question and get it marked →A fence measuring 2 metres in height and 20 metres in length needs painting. The area of the fence needs to be calculated so that enough paint for the job is purchased. After the…
Answer this question and get it marked →A range check is used to validate that the input temperature is an integer between −100 and 0, inclusive. Suggest suitable normal, abnormal, extreme and boundary test data to test…
Answer this question and get it marked →State one reason for using a verification check when inputting data.
Answer this question and get it marked →This pseudocode algorithm should allow 500 names of people and their heights to be entered and stored in two one-dimensional (1D) arrays. The name of a person and the height of…
Answer this question and get it marked →This pseudocode is an algorithm (shown in the shared stimulus). Complete the trace table for the algorithm, using the input data: 2, RACECAR, TREAT The trace table has the…
Answer this question and get it marked →May–June 2025, Paper 23
An input must be an integer between 10 and 95, inclusive. State the type of validation check to test if the input meets this requirement.
Answer this question and get it marked →This pseudocode represents an algorithm. DECLARE Store : ARRAY[1:100] OF CHAR DECLARE Word : STRING DECLARE Index : INTEGER DECLARE Letter : CHAR INPUT Word FOR Index <- 1 TO…
Answer this question and get it marked →May–June 2024, Paper 21
Tick (✓) one box to complete this sentence. A validation check to make sure that an email address contains an '@' sign is a [ ] A range check. [ ] B visual check. [ ] C presence…
Answer this question and get it marked →The flowchart represents an algorithm. It inputs Limit, then inputs Limit values into the array Numbers[]. It then performs a bubble sort (using a Flag and a Swap variable) to…
Answer this question and get it marked →May–June 2024, Paper 22
A program needs to make sure the characters input for a product code meet these rules: - The product code is six characters in length. - The first two characters must be "PD". -…
Answer this question and get it marked →This flowchart represents an algorithm. It uses a swap flag A and index B over the array List[1:5], comparing List[B] with List[B+1] and swapping them (via temporary variable T)…
Answer this question and get it marked →May–June 2024, Paper 23
Tick (✓) one box to complete this sentence. This flowchart symbol (a rectangle with double vertical bars at each side — the subroutine/predefined-process symbol) [ ] A represents…
Answer this question and get it marked →The flowchart represents an algorithm. It initialises L ← 0, S ← 10000, T ← 0, A ← 0, inputs Limit, then for Count from 1 to Limit it inputs Value, updates the smallest S (if…
Answer this question and get it marked →A program is to be written that will accept integers that are between the values of 1 and 80 inclusive. Give examples of normal, abnormal and extreme test data that could be used…
Answer this question and get it marked →October–November 2024, Paper 21
Tick (✓) one box to show which check is used for verification when data is input. [ ] A length check [ ] B range check [ ] C type check [ ] D visual check
Answer this question and get it marked →A programmer is designing a program to check the length of a password and to check if the password input is the same as the stored password. The program requirements are: - input…
Answer this question and get it marked →October–November 2024, Paper 22
Four flowchart symbols and five purposes are shown. Draw one line to link each flowchart symbol to its correct purpose. Not all purposes will be used. Flowchart symbols (top to…
Answer this question and get it marked →Outline one type of verification check that could be used when inputting data.
Answer this question and get it marked →This pseudocode represents an algorithm. An input of –1 will terminate the algorithm. DECLARE Count : INTEGER DECLARE Answer : INTEGER DECLARE Value : INTEGER REPEAT INPUT Value…
Answer this question and get it marked →Different types of test data are used during program development to make sure a program works as intended. A program being developed takes as input whole numbers that are not…
Answer this question and get it marked →October–November 2024, Paper 23
Tick (✓) one box to show which of the following is used to validate data on input. [ ] A checksum [ ] B double entry check [ ] C type check [ ] D visual check
Answer this question and get it marked →A programmer is testing a program that requires a positive value between 1 and 100 inclusive to be entered. The range check in the program is to be tested. Identify three…
Answer this question and get it marked →A flowchart checks that values stored in three variables are identical. If they are different, the highest value is stored in all three variables. Flowchart logic: START; IS A = B…
Answer this question and get it marked →An algorithm has been written in pseudocode to check that a password meets a set of rules. 01 OUTPUT "Please enter password " 02 INPUT Password 03 Accept ← TRUE 04 IF…
Answer this question and get it marked →May–June 2023, Paper 21
Describe what is meant by data validation.
Answer this question and get it marked →The flowchart represents an algorithm that searches the 2D array Word[] for a Letter input by the user, and outputs the phonetic alphabet word for that letter. Flowchart logic:…
Answer this question and get it marked →May–June 2023, Paper 22
A program needs to make sure the value input for a measurement meets the following rules: - the value is a positive number - a value is always input - the value is less than 1000.…
Answer this question and get it marked →This flowchart represents an algorithm. Flowchart logic: F ← 0; C ← 1; loop: IS X[C] < X[C+1]? If No, T ← X[C]; X[C] ← X[C+1]; X[C+1] ← T; F ← 1. Then C ← C + 1; IS C = 5? If No,…
Answer this question and get it marked →May–June 2023, Paper 23
Explain why verification checks are used when data is input.
Answer this question and get it marked →Four descriptions of validation checks are shown. Draw one line to link each description to the most appropriate check. Not all checks will be used. Descriptions: - to check that…
Answer this question and get it marked →The flowchart represents an algorithm. An input of –1 will terminate the algorithm. Flowchart logic: Total ← 0; loop: INPUT Value; IS Value = -1? If Yes, OUTPUT Total then STOP.…
Answer this question and get it marked →October–November 2023, Paper 21
An algorithm has been written in pseudocode. 01 DECLARE A[1:10] : STRING 02 DECLARE T : STRING 03 DECLARE C, L : INTEGER 04 L ← 10 05 FOR C ← 1 TO L 06 OUTPUT "Please enter name "…
Answer this question and get it marked →A programmer is designing an algorithm to calculate the cost of a length of rope. Requirements: input two values (length of rope in metres Length, cost of one metre Cost);…
Answer this question and get it marked →October–November 2023, Paper 22
Tick (✓) one box to complete the sentence. Verification is used to make sure that a value entered [ ] A has not changed during input. [ ] B is an integer. [ ] C is correct. [ ] D…
Answer this question and get it marked →A type of validation check is a length check. Another type of validation check is used to make sure that any date entered is in the dd/mm/yyyy style (dd = day, mm = month, yyyy =…
Answer this question and get it marked →The flowchart represents an algorithm that performs a process on groups of values that are input. The algorithm will fail if the first value of any group is 0. An input of –1 will…
Answer this question and get it marked →October–November 2023, Paper 23
Tick (✓) one box to show which term is an example of a verification check. [ ] A Double entry check [ ] B Format check [ ] C Length check [ ] D Presence check
Answer this question and get it marked →A programmer is writing a data entry program for booking theatre seats. The program needs to accept only whole numbers that are greater than or equal to one and less than or equal…
Answer this question and get it marked →This is an algorithm to find if a batch of parts has been manufactured successfully. Flowchart logic: Accept ← 0; Reject ← 0; loop: INPUT PartOK; IS PartOK = 'Y'? If No, Reject ←…
Answer this question and get it marked →Other IGCSE Computer Science topics
- Hardware (108)
- Data representation (26)
- The internet and its uses (23)
- Data transmission (21)
- Boolean logic (19)
- Databases (16)
- Automated and emerging technologies (13)
- Software (12)
- Programming (11)