Discuss Forum
1.
The complexity of Binary search algorithm is ___
- A. O (n)
- B. O (n)
- C. O (n)
- D. O (n)
Answer: Option B
Explanation:
Binary search runs in at worst logarithmic time, making O ( log n) comparison , where n is the number of elements in the array, the O is Big O notation, and log is the logarithm .
Post your comments here: