The complexity of Binary Search Algorithm is expressed as:

2026

The complexity of Binary Search Algorithm is expressed as:

  1. A.

    O(loge n)

  2. B.

    O (n2)

  3. C.

    O(log2 n)

  4. D.

    O (n)

Attempted by 211 students.

Show answer & explanation

Correct answer: C

The Binary Search Algorithm has a time complexity of O(log₂ n). This is because the algorithm repeatedly divides the search space in half with each iteration. Starting with a sorted array of size n, after k iterations, the remaining search space is n / 2^k. The algorithm terminates when the search space reduces to 1, meaning 2^k = n, or k = log₂ n.

Explore the full course: Up Lt Grade Assistant Teacher 2025