Question: Suppose that you are given a sorted array A of distinct integers fai,a2,..., an), drawn from 1 to m where m>n a) Give an O(logn)

Suppose that you are given a sorted array A of distinct integers fai,a2,..., an), drawn from 1 to m where m>n a) Give an O(logn) algorithm to find an integer from [1,m that is not present in A. For full credit, find the smallest such integer. b) Formally explain why your algorithm runs in O(logn) time c Formally explain why your algorithm is correct
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
