Search Algorithms – Binary, Binary Tree, and Linear Search (AQA A-Level Computer Science): Flashcards

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

Practise the cards

10 cards from this deck

Show

Simplest search method

Linear search

Linear search time complexity

O(n)

Binary search data requirement

Data must be sorted

Binary search time complexity

O(log n)

Max comparisons for 1M records (binary search)

20

MiddlePointer formula in binary search

(Low+High)/2(Low + High) / 2

When to move left in binary tree search

Search value < current node

Binary tree search starting point

Root node

Best for dynamic/frequently changing data

Binary tree search

Two factors for choosing search algorithm

Dataset size & data organisation

Join 100,000+ A-Level students studying Flashcards with us.

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