Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 11 - No. 36)

When using a linear search to find an item in an unsorted list, what is the worst-case scenario?
The item is found at the beginning of the list.
The item is not in the list.
The item is found in the middle of the list.
The item is found at the end of the list.

Explanation

The worst case is when the item is not in the list, requiring the algorithm to check every item.

Comments (0)

Advertisement