I have a question regarding time complexity. Is the time complexity of 7^logn in Θ(n) or Θ(n^n) or Θ(n^2) or something complety different? It confuses because the n is in the exponent. Thank you for your help
You can use a few logarithmic identities :
7^log(n) = 7^(log_7(n)/log_7(2)) = n^(1/log_7(2)) = n^log(7) ~= n^2.8
I think you can look on the following:
theta(n^2)=4^logn<7^logn<8^logn=2^3logn=theta(n^3)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.