GATE 2017 CS – Question 14
Consider the following functions from positive integers to real numbers: $10, \sqrt{n}, n, \log_2 n, \frac{100}{n}$.
The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) $\frac{100}{n}, 10, \log_2 n, \sqrt{n}, n$
Explanation
The function $\frac{100}{n}$ tends to 0, so it is the smallest. The constant 10 comes next. Then $\log_2 n$ grows without bound but more slowly than any power of $n$, so it is followed by $\sqrt{n}$ and then $n$.