I do this question in another way
Supposed we have n elements in an array
Now the qn is asked for success ful search ,ok
Now suppose our key elements is store at index 0 then the number of search is 1
And again supposed our key elements is store at index 1 then number of successful search is 2
And again supposed our key elements is store at index 2then number of successful search is 3
Now suppose if our element is store at last position then our number of successful search is n
Now examine fully
The total number of success full search(for all elements stored in an array) is:
1+2+3+4+.......n
That the summation comes to [n(n+1)]/2
According to summation of n natural number
Ok
But in the qn it is asked about average
So we need to divide it by n
So[ n(n+1)/2]/2
That's equal to ( n+1)/2
I think u got it way
Reply me that my answer(way) is correct or not