From slowest to fastest growth for large n, the correct order is
AO(n²), O(n log n), O(n), O(log n), O(1)
BO(1), O(n), O(log n), O(n²), O(n log n)
CO(log n), O(1), O(n), O(n²), O(n log n)
DO(1), O(log n), O(n), O(n log n), O(n²)
Answer & Solution
Correct answer: D. O(1), O(log n), O(n), O(n log n), O(n²)
The growth ladder from slowest to fastest: O(1) → O(log n) → O(n) → O(n log n) → O(n²) → O(n³) → O(2^n) → O(n!). Each entry is eventually exceeded by every later entry, no matter the constants. Memorise this; many GATE questions are won or lost by knowing the order.
Related questions
An NP-hard problem differs from an NP-complete one because NP-hard problemsThe first problem proved to be NP-complete wasA problem X is NP-complete if and only ifWhy does theoretical computer science draw the line at 'polynomial-time' for tractability?Which set inclusion is established (i.e., proven, not open)?The class NP is the set of decision problems for whichFloyd-Warshall detects the presence of a negative cycle byTopological sort is well-defined for