a. What is the largest number of key comparisons made by binary search in searching for akey in the following array?
3 14 27 31 39 42 55 58 61 64 69 73 77 80 85 89 93 98
b. Find the average number of key comparisons made by binary search in an unsuccessfulsearch in this array. Assume that searches for keys in each of the 19 intervals formed by thearray’s elements are equally likely.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here