GCSE Computer Science · 12 free flashcards
Algorithms flashcards
The key ideas of algorithms for GCSE Computer Science, as flashcards you can study with spaced repetition.
What you need to know
An algorithm is a precise, step-by-step set of instructions designed to solve a problem or complete a task. Students must understand how to design, represent and evaluate algorithms using pseudocode and flowcharts. Key concepts include sequence, selection and iteration as the three fundamental building blocks of any algorithm. Students also need to understand searching algorithms (linear search and binary search) and sorting algorithms (bubble sort, merge sort and insertion sort), including how they work and how to compare their efficiency. Efficiency is measured using the number of comparisons or steps an algorithm takes, often described in terms of how performance changes as the data set grows larger. Decomposition and abstraction are important design strategies. Students should be able to trace through an algorithm, identify errors and suggest improvements.
Algorithms: 12 key flashcards
Card 1
What is an algorithm?
An algorithm is a precise, ordered set of steps designed to solve a problem or complete a task, with a clear start, end and unambiguous instructions.Card 2
What are the three fundamental building blocks of an algorithm?
Sequence (steps in order), selection (making decisions with IF statements) and iteration (repeating steps using loops) are the three core building blocks.Card 3
What is a flowchart used for in algorithm design?
A flowchart is a visual way to represent an algorithm, using standard shapes: ovals for start/end, rectangles for processes and diamonds for decisions.Card 4
How does a linear search work?
A linear search checks each item in a list one by one from the start until the target is found or the list ends. It works on both sorted and unsorted lists.Card 5
How does a binary search work?
A binary search repeatedly halves a sorted list, comparing the middle item to the target and discarding the half that cannot contain it, until the item is found.Card 6
Why must a list be sorted before using a binary search?
A binary search relies on knowing which half of the list to discard. Without the list being sorted, this comparison has no meaning and the algorithm fails.Card 7
How does bubble sort work?
Bubble sort repeatedly compares adjacent pairs of items and swaps them if they are in the wrong order, passing through the list until no swaps are needed.Card 8
What is merge sort and what technique does it use?
Merge sort uses divide and conquer, splitting a list in half repeatedly until single items remain, then merging those pieces back together in sorted order.Card 9
What does it mean to trace through an algorithm?
Tracing means manually following each step of an algorithm, recording the value of variables at each stage, to check the algorithm works correctly or find errors.Card 10
What is the difference between decomposition and abstraction?
Decomposition means breaking a problem into smaller sub-problems. Abstraction means removing unnecessary detail to focus only on what is relevant to the solution.Card 11
How do you compare the efficiency of two algorithms?
Efficiency is compared by counting the number of steps or comparisons needed, and considering how that number grows as the data set becomes larger.Card 12
What is pseudocode?
Pseudocode is an informal, structured way of writing out an algorithm using plain language and simple code-like notation, without following the exact rules of any programming language.
Quick quiz
Question 1 of 3
A student wants to search for a name in an unsorted list of 1000 names. Which algorithm must they use?
Common mistakes
- Many students confuse decomposition with abstraction, writing that decomposition means removing detail when it actually means breaking a problem into smaller parts.
- Students often state that binary search can be used on any list, forgetting that the list must be sorted first for the algorithm to work correctly.
- When tracing a bubble sort, students frequently stop after one pass and assume the list is fully sorted, not realising multiple passes are usually needed.
More GCSE Computer Science flashcards
Planning your revision? Read how to revise GCSE Computer Science, or make cards from your own notes with the notes to flashcards tool.
Written for general GCSE revision. Exam boards and schools differ, so check your own specification for exactly what you need to know. Lerno is not affiliated with any exam board.