What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size n?

What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size n? Correct Answer θ(log<sub>2</sub>(n))

The correct answer is option 3:

Key Points

  • Binary search has the Worst-case and avg case time complexity O(log2n) and best case O(1) in an array. So, it is can also be written as θ(log2n)

and θ (1).

  • No of arithmetic operations will be θ (logn) in the worst case as every comparison needs 2 operations + and / by 2.

Related Questions

A teacher asked the class to subtract 5 from 75.70% of the class said: 25. Their work was shown as: \(\begin{array}{*{20}{c}} {\begin{array}{*{20}{c}} 7&5 \end{array}}\\ {\underline {\begin{array}{*{20}{c}}\ { - 5} \ \ \ &{} \end{array}} }\\ {\underline {\begin{array}{*{20}{c}} 2&5 \end{array}} } \end{array}\) Which of the following describes the most appropriate remedial action that the teacher should take to clarify this misconception?
Can linear search recursive algorithm and binary search recursive algorithm be performed on an unordered list?
Given delta is a global array and number of elements in the sorted array is 10, what are the values in the delta array?