Question: 5. (25 pt) Given an array A of n distinct integers and assume they are sorted in increasing order. Design an algorithm to find whether

5. (25 pt) Given an array A of n distinct integers and assume they are sorted in increasing order. Design an algorithm to find whether there is an index i with A[i]=i. The algorithm should run in O(logn) time. For the answer, please briefly write down your key observations of this problem, provide the pseudo codes with comments, and analyze your time complex. Hint: recursive function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
