When the linear search algorithm is applied to the array a1, a2, a3, . .. , an

Question:

When the linear search algorithm is applied to the array a1, a2, a3, . .. , an (of n distinct integers) for the integer key, suppose the probability that key has the value at is i /[n (n + 1)], for 1 < i < n. Under these circumstances, what is the average number of array elements examined?
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: