Mind map
Search Algorithms
Map content
Search Algorithms
Binary search
- Search lists that are in numerical or alphabetical order
- Works by repeatedly dividing in half the portion of the list that could contain the required data item
- 25 26 28 37 39 40 41 43 56 70 74 81
- Searching for 37
- 37 is below 40 so discard the numbers above 40
- 25 26 28 17 39
- The middle item is 28 so discard all items less than or equal to 28
- The algorithm repeats to find 37
- If 37 isn't found then it is not in the list
- For sorted longer lists, binary searches are better
Linear search
- Each item gets checked one by one
- Very slow for long lists
- Only really used for short lists
- Look at the first item, if it is this item you're looking for, then you're done. If not, look at the next item. Continue until the item is found.
- Simpler than a binary search but less efficient
Information
- Description
- GCSE Computer Studies Mind Map on Search Algorithms, created by Izzy DB on 13/12/2021.
- Created by
- Izzy DB · Dec 2021
- Updated
- Dec 16, 2021
- Views
- 0
- Rating