.Given an array of distinct integers A[1, 2,…n]. Find the tightest upper bound to check the existence of any index i for which A[i]=i.
Ans should be O(log n) right by doing binary search ??
IF it is giving that array is sorted..
Then O(log n) will be correct answer.
64.3k questions
77.9k answers
244k comments
80.0k users