Binary Search (AQA GCSE Computer Science): Flashcards

📚Flashcards
Binary Search
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

13 cards from this deck

Show

Searching algorithms

Methods computers use to find specific data or confirm absence

Two main types of searching algorithms

Linear search and binary search

How linear search works

Checks each item one by one from start until found or end reached

Alternative name for linear search

Sequential search

Binary search key requirement

List must be sorted in order first

Binary search strategy type

Divide and conquer

Binary search checks which value repeatedly

Middle value

Linear search worst case for 1 million items

Up to 1 million comparisons

Binary search max comparisons for 1 million items

Only 21 comparisons

Why binary search is much faster

Halves the remaining items with each comparison

When to use linear search

Data unsorted, small datasets, or simple implementation needed

When to use binary search

Data sorted/sortable, large datasets, need maximum efficiency

Binary search only works on what data type

Sorted data only

Explore AQA GCSE Computer Science Revision Notes by Topics

Explore AQA GCSE Computer Science Model Answers by Topics

Explore AQA GCSE Computer Science Quizzes by Topics

Explore AQA GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.