when the worst case occur in linear search algorithm
Answers
Answered by
0
It occurs either when the element which we are searching for is at the end of the list/array/data-set in which the search is being conducted, or if it is not present at all.
In these cases, if there are n total elements, n comparisons would occur to reach the result - which is the maximum number of trials to be done.
Similar questions