Binary search - GCSE Computer Science Definition
Reviewed by: Robert Hampton
Last updated
Binary search is an efficient algorithm used to find the position of a target value within a sorted list. It works by repeatedly dividing the list in half and comparing the middle element with the target value. If the middle element matches the target, the search is complete. If the target value is smaller, the algorithm continues to search in the left half, otherwise it searches in the right half. This process is repeated until the target is found or the search interval is empty. Binary search is much faster than linear search, especially for large datasets, as it reduces the problem size by half with each step. This makes it particularly useful for searching in large, ordered datasets, which is a key concept in the GCSE Computer Science curriculum.
Need help reaching your target grade? Explore our notes, questions by topic and worked solutions, tailor-made for GCSE Computer Science.
Explore GCSE Computer ScienceShare this article