- When \( n \) is even, the array can be split into two equal halves. The algorithm checks the middle element and then continues the search in one of the halves, which has size \( \frac{n}{2} \). Thus, we can express this as:
\[
W(n) = 1 +
Show more…