Skip to main contentSkip to solution

In binary search after every pass of the algorithm, the search area:

Solution

✅ Correct Option: 2

Binary search compares the target with the middle element of a sorted list. Depending on the result, it discards one half and continues in the other half. So after every pass the search area is reduced by half.

This is why its time complexity is O(log⁡n)O(\log n).


Option 4: the one third reduction belongs to ternary search, which splits the range into three parts.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question