Divide and conquer:
- Divide: Split list in half until single elements
- Conquer: Merge pairs back together in sorted order
[38, 27, 43, 3] โ [38, 27] and [43, 3] โ [38] [27] [43] [3] โ [27, 38] [3, 43] โ [3, 27, 38, 43]
Uses more memory (creates new arrays) but much faster for large lists!
This study notes covers Deep Dive: Merge Sort within Binary Search for GCSE Computer Science. Revise Binary Search in 3.1 Fundamentals of Algorithms for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This is a high-frequency topic, so it is worth revising until the explanation feels precise and repeatable. It is section 6 of 9 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.
Practice questions for Binary Search
Which of the following is a requirement before binary search can be used?
Describe how a binary search algorithm finds a target value in a sorted list.