1D Peak-finding problem, how to derive the formula?
Your guess is absolutely correct. The time taken to process an array of length&nbsp;$n$ is the time taken to choose which half to recurse on, plus the time taken to do the recursion. Doing the recursion takes time $T(n/2)$, since $T(m)$ is, by definition, the time taken to process an array of length&nbsp;$m$. Choosing which half to recurse on takes some constant number of steps, which is what $\Theta(1)$ means.  So this gives us that $T(n) = T(n/2) + \Theta(1)$. And, implicitly, $T(1)=\Theta(1)$ since, if the array has length one, there's no recursion to do.

How to solve that recurrence to get $T(n)=\Theta(\log n)$ is covered by our reference question. A rough-and-ready way to see it is to observe that the length of the array halves on each recursive call, so the number of recursions before we reach a single-element array is the answer to the question "How many times can I divide $n$ by two before I get&nbsp;$1$?", which is $\log_2 n$.