This study notes covers Comparison within Linear Search for GCSE Computer Science. Revise Linear Search in 3.1 Fundamentals of Algorithms for GCSE Computer Science with 15 exam-style questions and 8 flashcards. This topic shows up very often in GCSE exams, so students should be able to explain it clearly, not just recognise the term. It is section 4 of 8 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.
Comparison
| Aspect | Linear Search | Binary Search |
|---|---|---|
| How it works | Check each item from start to end | Divide list in half each time |
| Requires sorted data? | No | Yes |
| Best case | 1 comparison (first item) | 1 comparison (middle item) |
| Worst case (n items) | n comparisons | log₂(n) comparisons |
| Example: 1000 items | Up to 1000 checks | Up to 10 checks |
| Complexity | O(n) - linear | O(log n) - logarithmic |
Practice questions for Linear Search
How does a linear search work?
Describe how a linear search works on a list of n items. [3 marks]
Quick recall flashcards
What does binary search require?
Data must be sorted
What does linear search do?
Checks each item from start to end until found