Binary Search

Computer ScienceOCRGCSEUnit: 3.1 Fundamentals of Algorithms
Free taster
5 of 6 sections open
The basics

Putting Things in Order

Putting Things in Order

Bubble sort is like bubbles rising in water - compare neighbours, swap if wrong order, biggest values "bubble up" to the end. Keep passing through until no swaps needed. Insertion sort is like sorting cards in your hand - pick each card and insert it into the correct position among the cards you've already sorted. Merge sort is like sorting by splitting a deck in half repeatedly, then merging back in order.

Now try it yourself

Quiz · Question 1 of 15

Which of the following is a requirement before binary search can be used?

Tap an answer to check it

Revise every Computer Science topic, free during alpha

Binary Search is one of 60 topics on PrepWise — all aligned to your exam board.

Start revising free →