Apuntes
Binary Search Algorithm

Contenido del apunte (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!

Información
- Descripción
- GCSE (Fundamentals of Algorithms) Computing Apunte sobre Binary Search Algorithm, creado por Dexter Hill el 23/12/2020.
- Creado por
- Dexter Hill
- Visitas
- 0
- Valoración