previous |
start |
next
Linear Search
- Also called sequential search
- Examines all values in an array until it finds a match or
reaches the end
- Number of visits for a linear search of an array of n
elements
- The average search visits n/2 elements
- The maximum visits is n
- A linear search is an O(n) algorithm
previous |
start |
next