46.0k views
1 vote
Suppose there is exactly one index k such that a[k] = x. what is the expected number of indices into a that we must pick before we find x and random-search terminates?

1 Answer

4 votes
Suppose there is only one index k such that a [k] = x. What is the expected index number of indexes that must be selected before x and random search?
User Adara
by
6.3k points