Runtime analysis for the following few cases?

I rate the following: from slow growth to very fast growth:

a) 2^log(n)
b) 2^2^log(n)
c) n^5/2
d) 2^n^2
e) n^2*log(n)

I have a < b < e < c < d, but I was told that this is wrong. Can someone give a helpful answer and explanation? Thanks.

+4
source share
1 answer

b) exponentially since exponentiation is right-associative. That is, 2 ^ 2 ^ log (n) is 2 ^ (2 ^ log (n)) = 2 ^ n, not 4 ^ log (n). The relative order of the remaining 4 is correct; you just need to raise b to a higher position (which position do I leave for you to find out).

+1
source

Source: https://habr.com/ru/post/1616272/


All Articles