While reading the chapter on Quantum Computation (starting on page 401) of the draft version of the Arora & Barak book I came across exercise ยง4 on page 431 that reads as:
Suppose that $f$ is computed in $T$ time by a quantum algorithm that uses a partial measurement in the middle of the computation, and then proceeds differently according to the result of the measurement. Show that $f$ is computable by $\mathcal{O}(T)$ elementary operations.
(This exercise is implicitely used on page 416.)
So far I think I understand the required definitions, but unfortunately I do not see how to solve this exercise. Could you please give me a hint?