✏️ Explanatory Question
Reorder the following efficiencies from the smallest to the largest: (a) n·log2(n) (b) n + n2 + n3 (c) 24 (d) n0.5
Reorder the following efficiencies from the smallest to the largest: (a) n·log2(n) (b) n + n2 + n3 (c) 24 (d) n0.5
Ans. 24 < n0.5 < n·log2(n) < n + n2 + n3
💡 Explanation:
To arrange the expressions correctly, compare their growth rates as n becomes very large.
Therefore, the correct growth order is: constant → square root → log-linear → cubic .
Memory tip: O(1) < O(√n) < O(n log n) < O(n3)