Mindmap
LINEAR AND BINARY SEARCHES
Inhalt der Mindmap
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
Bilder und Dateien der Mindmap
Informationen
- Beschreibung
- IGCSE ICT Mindmap am LINEAR AND BINARY SEARCHES, erstellt von Sophia Ma am 23/06/2018.
- Erstellt von
- Sophia Ma
- Aufrufe
- 0
- Bewertung