An algorithm can be described as “A set of steps that show how to perform a task or reach a goal”. When we talk about algorithms in Computer Science, this generally means the design of a program – not every task can be solved using computational methods as some tasks involve non-mathematical tasks (known as ‘messy problems’) that generally relate to unpredictable human behavior.
We usually design our algorithms in either a flowchart or as pseudocode. In either way, our algorithms should be focused o the logic of the task which means that we should be able to implement them using any programming language. This is known as being ‘language independent’.
There are a number of ‘standard algorithms’ that we are expected to know when studying computer science. These are algorithms that make up a lot of what we do when designing programs and include patterns that can be reused in other solutions.
The ‘standard algorithms’ we are expected to know and recognise at GCSE are specific to Sorting & Searching. (See Searching Algorithms & Sorting Algorithms).
Pseudocode in Exams
In your exam, it is likely that you will be shown or asked to write algorithms using pseudocode.
Each exam board represents pseudocode in a slightly different way, although when you write your own pseudocode the advice is to ensure that you are consistent.
For example, some exam boards will use <– instead of = so instead of x = 5 you would write x <– 5
In all pseudocode, loops have a start and an end:
WHILE x < 5 DO OUTPUT x END WHILE
It is a good rule of thumb to write your keywords in CAPITALS – you won’t actually lose marks for not doing so, but it makes your pseudocode clearer, and the clearer that it is, the easier it is to mark!
Use the links below to access the current pseudocode guides:
Looking for More?
Sign in to access the following extras on this page for members:
Looking for something else? Check back soon as new resources are added every week!