Question: Suppose there are nine array elements, a [0] through a[8]. Each of the odd elements, a [1], a[3], a[5], and a[7] has a 10% chance
Suppose there are nine array elements, a [0] through a[8]. Each of the odd elements, a [1], a[3], a[5], and a[7] has a 10% chance (0.1) of being the one searched for. Each of the even elements a [0], a[2], a[4], a[6] and a[8] has a 5% change (0.05) of being the one searched for. With probability 35% (0.35), the element being sought is not found in the array. In this case, what is the expected number of array accesses
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
