Let A be an array of integers. A Fixed point of 'A' is an integer 'i' for which A[i] = i. The time complexity of an efficient algorithm to find any fixed point in a sorted array of n is
A
O(loglogn)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
O(n2)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
O(n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
O(logn)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution
The correct option is DO(logn) Apply Binary search