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.
Keep practising Algorithms
Browse all Algorithms questions for GATE CSE, or explore more Computer Science topics.