Mapa mental
LINEAR AND BINARY SEARCHES
Contenido del mapa
LINEAR AND BINARY SEARCHES
Terminology
- Linear Search
- A method of searching where you start at the beginning of the list and check it item by item
- Binary Search
- A method of searching the search splits the part of the list being searched into 2 with each check.
- Linear Search
Linear Search
- Pseudocode
- Start at house 1
- WHILE we haven't found our friend:
- knock on door to see who lives there
- IF it is not our friend THEN
- Move on to next door
- END IF
- END WHILE
- Pseudocode
Binary Search
- Procedure
- Set Boundaries
- Find Halfway Point
- IF Halfway Point too high, ignore everything bigger than midway point
- IF Halfway Point too low, ignore everything smaller than midway point
- Number after or before midway point = new range
- Repeat until we find the number
- Number after or before midway point = new range
- IF Halfway Point too low, ignore everything smaller than midway point
- IF Halfway Point too high, ignore everything bigger than midway point
- Find Halfway Point
- Set Boundaries
- Procedure
Imágenes y archivos del mapa
Información
- Descripción
- IGCSE ICT Mapa Mental sobre LINEAR AND BINARY SEARCHES, creado por Sophia Ma el 23/06/2018.
- Creado por
- Sophia Ma
- Visitas
- 0
- Valoración