Join WhatsApp ChannelDaily MCQs & Exam Updates
Computer Science Medium CSS FPSC Uploaded: 20 Jun 2026

What is the time complexity of Binary Search in the worst case?

  • A O(n)
  • B O(log n)
  • C O(n²)
  • D O(1)
Correct Answer: Option B — O(log n)
Explanation:
Binary Search repeatedly divides a sorted dataset into halves until the target value is found or determined absent. Because the search space is halved each step, the worst-case time complexity is logarithmic, O(log n).
Submitted by: PaperMCQs
Related MCQs