Mapa mental
LINEAR AND BINARY SEARCHES
Conteúdo do 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
Imagens e arquivos do mapa
Informações
- Descrição
- IGCSE ICT Mapa Mental sobre LINEAR AND BINARY SEARCHES, criado por Sophia Ma em 23-06-2018.
- Criado por
- Sophia Ma
- Visualizações
- 0
- Avaliação