# Reccurent runtime

If $$T(n) = T\left(\frac{n}{2}\right) + 5$$ (binary search), then the runtime in Big-O notation is $$O(\log(n))$$.

If $$T(n) = T\left(\frac{n}{2}\right) + 0$$, then is it correct to say that the the runtime in Big-O notation is $$O(1)$$?

Normally, one would need to recursively calculate $$T\left(\frac{n}{2}\right)$$, but since the constant is 0, the whole thing can be optimized to $$T(n) = 0$$.

• Have you tried proving your claim? – Yuval Filmus Feb 28 at 19:42