Exam
Vibe
Home
Engineering
Aerospace Engineering
Biomedical Engineering
Chemical Engineering
Civil Engineering
Computer Science
Digital Marketing Quiz
Electrical Engineering
Electronics and Communication Engineering
Mechanical Engineering
Govt Exam
Banking Exams
Other Government
Police
Railway Exams
SSC
State PSC Exams
Teaching / Education Exams
UPSC Exams
Blog
Contact
π
Home
βΊ
Computer Science
βΊ
Algorithms MCQ
βΊ
Which of the following is the time complexity of binary s...
Which of the following is the time complexity of binary search algorithm?
A. O(n)
B. O(log n)
C. O(n log n)
D. O(1)
Explanation:
Binary search works by dividing the array in half, so its complexity is O(log n).
Tags:
Algorithms MCQ
,
Computer Science
Next Β»
More from Algorithms MCQ:
Which sorting algorithm has the best average case time complexity?
In a graph, which traversal technique uses a queue?
Which data structure is used in a recursive function call?
Which sorting algorithm has the best average-case performance?
What is the time complexity of binary search algorithm?
Dijkstraβs algorithm is used to solve: