The worst case time complexity of finding an element using linear search is ______.
The worst case time complexity of finding an element using linear search is ______.
Solution
✅ Correct Option: 2
Linear search checks elements one by one from the start. In the worst case, the element is at the last position or is absent, so all elements are compared.
Number of comparisons in the worst case , so the time complexity is .
Option 1: is the worst case of binary search, which needs a sorted array.
Options 3 and 4: and are typical of sorting algorithms (bubble sort, merge sort), not searching a single list once.
Related questions:
2026: 31 May Shift 1
2025: 30 May Shift 2
2026: 23 May Shift 2