This study notes covers Comparison within Linear Search for GCSE Computer Science. Revise Linear Search in Algorithms for GCSE Computer Science with 15 exam-style questions and 8 flashcards. This topic appears less often, but it can still be a useful differentiator on mixed-topic papers. It is section 4 of 7 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.
Topic position
Section 4 of 7
Practice
15 questions
Recall
8 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 |