When an element to be searched is present at one of the following positions in an unsorted list, then which situation(s) will take the least number of comparisons?
(A). mid position
(B). first position
(C). last position
(D). not present
When an element to be searched is present at one of the following positions in an unsorted list, then which situation(s) will take the least number of comparisons?
(A). mid position
(B). first position
(C). last position
(D). not present
Solution
✅ Correct Option: 3
In an unsorted list, linear search checks elements one by one from the start. If the element is at the first position, it is found in just 1 comparison, which is the minimum possible (best case).
| Position of element | Comparisons for a list of elements |
|---|---|
| (B) First | 1 |
| (A) Mid | about |
| (C) Last | |
| (D) Not present |
Options 1 and 4: (D) is the worst case, since every element must be checked before concluding the item is absent. (C) is also a worst case, needing comparisons.
Related questions:
2026: 23 May Shift 2
2025: 21 May Shift 1
2026: 18 May Shift 2