Binary search has time complexity:
-
A
O(1)
-
B
O(log n)
Correct answer
-
C
O(n)
-
D
O(n²)
Correct answer
B. O(log n)
9 views
Explanation
Binary search: O(log n). Source: FBISE Class 12 Computer Science syllabus-aligned item.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ