Consider randomized binary search. You are given a sorted arrayA of n integers and the integer v that you are searching for ischosen uniformly at random from A. Then, instead of comparing v tothe value in the middle of the array, the randomized binary searchvariant chooses a random number r from 1 to n and it compares vwith A[r]. Depending on whether v is larger or smaller, thisprocess is repeated recursively on the left sub-array or the rightsub-array, until the location of v is found. Prove a tight bound onthe expected running time of this algorithm. Use linearity ofexpectations.
Expert
OR
PayPal Gateway not configured
OR
PayPal Gateway not configured
PayPal Gateway not configured
PayPal Gateway not configured