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?

Respuesta :

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?