1
$\begingroup$

Is there an online tool that returns the time complexity of recursion functions?

For instance, when I enter $T(n) = T(n/2) + n$, I'd like to get $\Theta(n)$.

I tried using Wolfram Alpha, but it doesn't return the above result I was looking for.

$\endgroup$
2
$\begingroup$

Wolfram Alpha is giving you a more accurate estimate, $T(n) \sim 2n$. However, it can also give you the weaker estimate $T(n) = O(n)$ you are after:

Wolfram Alpha screenshot

Just click on Show weaker bound.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.