<<< Search Algorithms | Index | Selection Sort >>> |
If search item is always at the end of the list, it will take many comparisons to find.
If search item is not in the list, then we will compare the item with every element in the list.
A sequential search is therefore not efficient for large lists; in fact, it can be proved that, on average, the number of comparisons made by a sequential search is equal to half the size of the list.
<<< Search Algorithms | Index | Selection Sort >>> |