What is the average case time complexity of binary search using recursion?
O(nlogn)
O(logn)
O(n)
O(n^{2})
Correct Answer: B — O(logn)
Explanation:
T(n) = T(n/2) + 1, Using the divide and conquer master theorem.