0 votes 0 votes given a sorted array of distinct integers A[1........n], you want to find out whether there is an index i for which A[i]=i.if this problem is solved using divide and conquer method ,then the algorithm run in a) O(n) a) O(nlogn) a) O(logn) a) O(n2) Algorithms divide-and-conquer sorting time-complexity + – ajit asked Sep 7, 2015 • edited Jun 26, 2022 by makhdoom ghaya ajit 667 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 1 votes 1 votes Ans- 0(logn) Algorithm int special_search(int a[],int l,int r) { int mid; if(l<r) { mid=l+(r-l)/2; if(a[mid]==mid) return mid; else if(a[mid]>mid) return special_search(a,l,mid-1); else return(a,mid+1,r) } } Saurav answered Sep 7, 2015 Saurav comment Share Follow See all 0 reply Please log in or register to add a comment.