algorithm - Complexity class -


Assume that the methods m1 and m2 are static void and calculate the same result by processing the argument of an object [] From we find that M1 -> T (N) = 100 N and M2 -> T (N) = 10Nlog2N where times are in microseconds. Which type of input is better to use M1 and M2? So I will use M1 for a large number, while I'll use the m2 for a small number right? Just check the answers

You can call N & gt; 0 is such that 100N> 10 n log 2 n , so this is just an algebra problem. Divide both sides by 10N and give you the 10 & gt; Log2 N , i.e., N & lt; 2 ** 10 , meaning N & lt; 1024 . It's not like this! -)


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -