Problem solving is the foundation of everything else in computer science. If you can break a problem into pieces, describe each piece clearly, and put them back together as a working algorithm, you already have the core skill the edexcel igcse computer science problem solving section tests.

Think of it like following a recipe. Before you cook, you figure out what you need (inputs), what you are making (outputs), and the steps to get there (processing). If the recipe is too complex, you break it into stages: prepare the sauce, cook the pasta, combine. That is decomposition. If you focus only on the steps that matter and ignore irrelevant details (you do not need to know how the wheat was grown to boil pasta), that is abstraction. And when you write the recipe down step by step so someone else can follow it exactly, you have created an algorithm.

These problem solving edexcel igcse concepts, central to the 4CP0 specification, form the backbone of both Paper 1 and Paper 2. The edexcel igcse computer science revision notes below cover every objective in this section, with worked examples and self-check questions to test your understanding.

Algorithms: what they are and how to work with them

An algorithm is a step-by-step set of instructions designed to perform a specific task or solve a particular problem. Algorithms can be represented in several ways: as flowcharts, as pseudocode, as written descriptions, or as program code. The igcse 4cp0 problem solving section requires you to interpret algorithms in all four forms and to create your own.

Pseudocode

Pseudocode is a way of writing algorithms using structured English that resembles a programming language but is not tied to any specific one. It lets you focus on the logic without worrying about syntax rules. Here is a simple example that checks whether a number is positive, negative, or zero:

INPUT number
IF number > 0 THEN
    OUTPUT "Positive"
ELSE IF number < 0 THEN
    OUTPUT "Negative"
ELSE
    OUTPUT "Zero"
ENDIF

Notice that the pseudocode uses indentation to show which statements belong inside each branch. In the exam, clear indentation matters. It shows the examiner you understand the structure of your algorithm.

Flowcharts

Flowcharts use standard shapes to represent different types of operation:

ShapeMeaningExample
Oval (rounded rectangle)Start / EndBegin the program, Stop
ParallelogramInput / OutputINPUT name, OUTPUT total
RectangleProcesstotal = total + 1
DiamondDecisionIs score > 50? (Yes/No branches)
ArrowFlow of controlShows the order of operations

When drawing flowcharts in the exam, always label your decision diamonds with the condition and mark the two exits clearly as Yes and No. A common mistake is drawing a diamond with only one exit, which defeats the purpose of a decision.

Trace tables

A trace table tracks the values of variables as an algorithm executes. You create a column for each variable and a row for each step (or each iteration of a loop). Consider this algorithm:

SET total TO 0
SET count TO 1
WHILE count <= 4
    SET total TO total + count
    SET count TO count + 1
ENDWHILE
OUTPUT total

The trace table would look like this:

Steptotalcountcount <= 4?Output
101
212Yes
333Yes
464Yes
5105No10

The output is 10 (which is 1 + 2 + 3 + 4). Trace tables are a powerful debugging tool and appear regularly in edexcel igcse computer science practice questions. Fill in every row; do not skip iterations.

Standard algorithms: sorting and searching

The specification requires you to understand four standard algorithms. Think of these as tools in a toolkit: each has a specific job and specific strengths.

Linear search

Linear search checks each item in a list one by one until it finds the target or reaches the end. Imagine looking for a friend's name in an unsorted class register by reading every name from top to bottom. It is simple and works on any list, but it can be slow if the list is long.

SET found TO FALSE
SET index TO 0
WHILE index < LENGTH(list) AND found = FALSE
    IF list[index] = target THEN
        SET found TO TRUE
    ELSE
        SET index TO index + 1
    ENDIF
ENDWHILE
IF found = TRUE THEN
    OUTPUT "Found at position " + index
ELSE
    OUTPUT "Not found"
ENDIF

Binary search

Binary search only works on a sorted list. It repeatedly halves the search area by comparing the target to the middle element. Think of guessing a number between 1 and 100: you start at 50, then go to 25 or 75, then halve again. Each comparison eliminates half the remaining possibilities.

SET low TO 0
SET high TO LENGTH(list) - 1
SET found TO FALSE
WHILE low <= high AND found = FALSE
    SET mid TO (low + high) DIV 2
    IF list[mid] = target THEN
        SET found TO TRUE
    ELSE IF list[mid] < target THEN
        SET low TO mid + 1
    ELSE
        SET high TO mid - 1
    ENDIF
ENDWHILE
Exam tip: A very common mistake is applying binary search to an unsorted list. If the exam gives you an unsorted list and asks which search method to use, the answer is linear search. Binary search requires the data to be sorted first.

Bubble sort

Bubble sort compares adjacent pairs and swaps them if they are in the wrong order. Each pass through the list moves the largest unsorted value to its correct position, like a bubble rising to the surface. The algorithm repeats until a full pass produces no swaps.

SET swapped TO TRUE
WHILE swapped = TRUE
    SET swapped TO FALSE
    FOR i FROM 0 TO LENGTH(list) - 2
        IF list[i] > list[i + 1] THEN
            SWAP list[i] AND list[i + 1]
            SET swapped TO TRUE
        ENDIF
    NEXT i
ENDWHILE

Bubble sort is easy to understand and implement, but it is slow for large lists because it makes many comparisons and swaps.

Merge sort

Merge sort uses a divide-and-conquer approach. It splits the list in half repeatedly until each sub-list contains a single item, then merges the sub-lists back together in sorted order. Think of sorting a shuffled deck of cards by splitting it into smaller and smaller piles, then combining them pairwise so each merged pile is in order.

Merge sort is more efficient than bubble sort for larger data sets, but it uses more memory because it creates new sub-lists during the splitting phase.

AlgorithmBest forDrawback
Linear searchSmall or unsorted listsSlow for large lists
Binary searchLarge sorted listsList must be sorted first
Bubble sortSmall lists, nearly sorted dataVery slow for large lists
Merge sortLarge lists where efficiency mattersUses extra memory for sub-lists

Decomposition and abstraction

Decomposition means breaking a complex problem into smaller, more manageable sub-problems. Each sub-problem can then be solved independently. If you were asked to design a quiz program, you might decompose it into: display a question, accept user input, check the answer, update the score, and display the final result. Each of those is a distinct piece of work you can build and test separately.

Abstraction means removing unnecessary detail so you can focus on what matters. A map of the London Underground is an abstraction: it shows stations and connections but ignores the actual geography, the depth of the tunnels, and the colour of the train seats. Those details are real, but they are irrelevant to the problem of getting from one station to another.

In the edexcel igcse computer science explained section of the specification, abstraction and decomposition are listed as skills you must apply, not just define. Exam questions might give you a scenario (such as designing a library system or a weather station) and ask you to identify the inputs, outputs, and processing required, or to break the problem into sub-problems.

Worked example: designing a temperature monitor

A school wants a program that reads temperature values from a sensor every hour, stores them, and outputs a warning if the temperature exceeds 30 degrees.

Decomposition:

  • Sub-problem 1: Read the temperature from the sensor (input)
  • Sub-problem 2: Store the reading in a list (processing)
  • Sub-problem 3: Check whether the reading exceeds 30 (decision)
  • Sub-problem 4: Display a warning message if it does (output)
  • Sub-problem 5: Repeat every hour (iteration)

Abstraction: We do not need to know the brand of the sensor, the type of wire connecting it, or the colour of the warning text. We focus only on the temperature value, the threshold, and the action to take.

Pseudocode solution:

SET readings TO []
WHILE program is running
    SET temp TO READ_SENSOR()
    APPEND temp TO readings
    IF temp > 30 THEN
        OUTPUT "Warning: temperature is " + temp + " degrees"
    ENDIF
    WAIT 3600 seconds
ENDWHILE

Common mistakes in this section

  • Confusing flowchart shapes. Using a rectangle for a decision or a diamond for a process will lose marks, even if the labels inside are correct. Memorise the shapes.
  • Off-by-one errors in trace tables. If a loop runs while count is less than or equal to 5, it executes when count is 5. If it runs while count is less than 5, it stops at 4. That single word changes the final answer.
  • Describing decomposition without decomposing. The exam does not want a definition of decomposition; it wants you to actually break the given problem into named sub-problems. List them.
  • Forgetting that binary search needs sorted data. If the question states the list is unsorted, binary search is not applicable. Always check.
  • Incomplete bubble sort traces. When asked to show one pass of a bubble sort, you must show every comparison, not just the swaps. The comparisons where no swap occurs are part of the pass.

Self-check questions

Use these to test yourself. Cover the answers and try to work through each one from scratch before checking. These are the kind of edexcel igcse computer science practice questions that build exam readiness.

  1. Write pseudocode for an algorithm that inputs 10 numbers and outputs the largest one.
  2. Trace through the bubble sort algorithm with the list [5, 3, 8, 1, 2]. Show the state of the list after each pass.
  3. Explain why binary search is more efficient than linear search for a sorted list of 1,000 items.
  4. A school attendance system needs to record whether each student is present or absent, calculate the total number present, and display a warning if attendance falls below 90%. Decompose this problem into sub-problems and identify the inputs, processing and outputs.
  5. Draw a flowchart for an algorithm that asks a user for their age and outputs "Adult" if the age is 18 or over, or "Minor" if it is under 18.
How to use these edexcel igcse computer science notes effectively: do not just read through them once. After studying each sub-topic, close this page and try to recreate the pseudocode examples from memory. If you can write a correct binary search algorithm without looking, you understand it. If you cannot, re-read and try again. Active recall is what turns edexcel igcse computer science notes into actual exam performance.

The problem solving section is where the exam tests whether you can think like a computer scientist, not just remember facts. Every algorithm question, every trace table, every decomposition task is checking whether you can take a problem, structure it logically, and walk through it step by step. These are skills you build through practice, and the more algorithms you write and trace by hand, the more natural the process becomes.

Descarga la aplicación en Google Playstore.

Todo lo que necesitas para destacar en JAMB, WAEC y NECO.

Green Bridge CBT Mobile App
Asistente de Chat de Aprendizaje Personalizado con IA
Miles de exámenes anteriores de IGCSE, JAMB, WAEC y NECO.
Más de 1200 notas de lecciones
Soporte sin conexión: Aprende en cualquier momento y lugar.
Horario del Puente Verde
Resúmenes de Literatura y Preguntas Potenciales
Controla tu rendimiento y progreso.
Explicaciones detalladas para un aprendizaje integral
Resumido.

Complete revision notes for edexcel igcse computer science problem solving: algorithms, decomposition, abstraction, pseudocode, and sorting/searching.