Computer Science Medium css fpsc

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).
Related MCQs