What is the best case for linear search?
O(nlogn)
O(logn)
O(n)
O(1)
Correct Answer: D — O(1)
Explanation:
The element is at the head of the array, hence O(1).