Edexcel IGCSE Computer Science 4CP0
Algorithms
Searching and Sorting Algorithms
Decomposition and Abstraction
Developing and Testing Code
Programming Constructs and Operators
Data Types and Data Structures
Input, Output and Validation
Data Representation
Data Storage and Compression
Encryption
Hardware and the CPU
Software
Programming Languages and Translators
Networks
Network Security
The Internet and the World Wide Web
Emerging Trends, Issues and Impact
Searching and Sorting Algorithms
- 3 subtopics
- 9 things to know
- Papers 1 and 2
Learn Searching and Sorting Algorithms in runs of four questions, then keep it with spaced repetition.
What Searching and Sorting Algorithms covers
Searching and Sorting Algorithms is examined in Paper 1, Principles of Computer Science, and Paper 2, Application of Computational Thinking. It covers linear search and binary search; bubble sort; and merge sort.
Where it is assessed
Papers 1 and 2
Computer Science 4CP0: this topic is examined on Paper 1, Principles of Computer Science (2 hours, 50%), and on Paper 2, Application of Computational Thinking (3 hours, on screen, 50%).
Check the Pearson Edexcel specification ↗The 3 subtopics
Each one has its own page.
- Linear search and binary searchHow linear and binary searches work, worked binary searches, the number of comparisons each needs, and when each suits the data.Open →
- Bubble sortHow a bubble sort compares and swaps adjacent items, a worked first pass, how a flag makes it efficient, and its strengths and limits.Open →
- Merge sortHow a merge sort splits a list into single items and merges them in order, a worked example, and when it beats a bubble sort.Open →
What you need to know
Answer each one before you reveal it.
Search the sorted list 3, 8, 12, 19, 25, 31, 40 for 10 using a binary search
Show how a merge sort orders 6, 3, 8, 1
How does a bubble sort know that the list is sorted?
How can a bubble sort be made more efficient?
How does a merge sort work?
Give one advantage and one disadvantage of a binary search
Give one advantage and one disadvantage of a bubble sort
Why is a list of one item already sorted?
Take Searching and Sorting Algorithms further
The same content, four other ways.
Commonly confused
Pairs that lose marks when they are blurred together.
Linear search vs Binary search
Linear search: checking each item in turn from the start. Binary search: repeatedly checking the middle item of a sorted list and discarding half.
Bubble sort vs Merge sort
Bubble sort: repeatedly comparing and swapping adjacent items. Merge sort: splitting a list into single items and combining them back in order.
Questions from this topic
Each one with the model answer underneath.
- 1
How does a linear search work?
Model answer
A linear search checks each item in the list in turn, starting at the first. The search stops when the item is found or the end of the list is reached.
- 2
Give one advantage and one disadvantage of a linear search.
Model answer
A linear search works on an unsorted list. A linear search is slow for a long list, because every item may need to be checked.
- 3
How does a binary search work?
Model answer
A binary search looks at the middle item of a sorted list. Half of the list is discarded each time, until the item is found or no items remain.
- 4
What must be true of a list before a binary search can be used?
Model answer
The list must be sorted into order. A binary search relies on knowing which half could hold the item.
- 5
Give one advantage and one disadvantage of a binary search.
Model answer
A binary search is much faster than a linear search on a long list. The list must be sorted first, which takes time.
- 6
Search the sorted list 3, 8, 12, 19, 25, 31, 40 for 25 using a binary search.
Model answer
The sorted list 3, 8, 12, 19, 25, 31, 40 has 19 as its middle item. The target 25 is larger, so 19 and the left half are discarded. The middle of 25, 31, 40 is 31, and 25 is smaller, so 31 and 40 are discarded. The item 25 is checked next and found.
Everything in your subscription
Runs, plus a mode for every other kind of session.
Searching and Sorting Algorithms revision questions
- What does Searching and Sorting Algorithms cover in Edexcel IGCSE Computer Science?
- 3 subtopics: linear search and binary search, bubble sort and merge sort. Each one has its own page with questions and model answers.
- How is Searching and Sorting Algorithms organised?
- By the Edexcel 4CP0 specification, subtopic by subtopic, so it matches the order you are taught it in.
Every question in Searching and Sorting Algorithms, on a schedule.
Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.