CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

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(log log n)
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(log n)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

The correct option is D O(log n)
Apply Binary search

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Similar to Different
QUANTITATIVE APTITUDE
Watch in App
Join BYJU'S Learning Program
CrossIcon