Time complexity of binary search (worst case):
13 views
- O(n)
- O(log n) (Correct Answer)
- O(n log n)
- O(1)
Explanation
Binary search repeatedly halves the search space, leading to logarithmic complexity. It requires sorted data.
Binary search repeatedly halves the search space, leading to logarithmic complexity. It requires sorted data.
No comments yet. Be the first to comment!
Explore thousands of MCQs across every exam category on Exams Nepal.
Find More MCQs