Notas
Binary Search Algorithm

Conteúdo das notas (1)
Página 1
Binary Search
Binary Search starts by picking the middle element of the array. If it is larger than the item wanted, it removed the first half of the array. If it is smaller, it removes the second half. It will continue to do this until it finds the element wanted.
Advantages:
Fast - gets rid of half the array on just the first run
It can indicate where in the array the element is (near the beginning, towards the end)
Disadvantages
Harder to implement that linear search
Requires an already sorted (ascending order) array!

Informações
- Descrição
- GCSE Computing (Fundamentals of Algorithms) Notas sobre Binary Search Algorithm, criado por Dexter Hill em 23-12-2020.
- Criado por
- Dexter Hill
- Visualizações
- 0
- Avaliação