Mapa mental
SEARCHING ALGORITHMS
Contenido del mapa
SEARCHING ALGORITHMS
There are two types of searching algorithms. Binary searching and linear searching
- Linear searching is where you start with the first thing and look through every thing until you get to the value you were looking for. The upside to linear searching is the values or words don't have to be in order. However it is less suited to large lists because it takes longer.
- Binary searching is where you have to order the list before searching. Then you have to add the first and last number and then divide it by two. If it is a decimal you always round up. Then if the value is not that out find out whether it is above or below. Then you add the first and last number of the numbers left and do the same thing until you find the value you are searching for.
- Example question
- Please do a binary search for these words. ORANGE, APPLE, PEAR, GRAPE,BANANA AND STRAWBERRY TO FIND BANANA.
- Answer: put the words in alphabetical order first. APPLE, BANANA, GRAPE, ORANGE, PEAR AND STRAWBERRY.
Información
- Descripción
- Mapa Mental sobre SEARCHING ALGORITHMS, creado por Benjamin Ainsley el 24/01/2019.
- Creado por
- Benjamin Ainsley
- Visitas
- 0
- Valoración