Comparing Searches
Linear search:
- just look through array one element at a time until you find the one you want or you reach the end of the list
Again use the number of comparisons as the representative operation
- running time of search is proportional to number of comparisons
For a list with N elements
- takes at most N comparisons
- takes N/2 comparisons on average