Skip to content

OrderNot attempted

Rank the growth rates

Order these from FASTEST to SLOWEST growing (best to worst for large n).

Drag the rows, or use the arrows, to put them in order from first to last.

  1. O(2ⁿ)
  2. O(n²)
  3. O(n log n)
  4. O(n)
  5. O(log n)
  6. O(1)
Show answer & explanation

Correct order:

  1. O(1)
  2. O(log n)
  3. O(n)
  4. O(n log n)
  5. O(n²)
  6. O(2ⁿ)

At n = 1,000,000: log n ≈ 20, n log n ≈ 20M, n² = 10¹². Exponential is hopeless beyond n ≈ 40, which is why naive recursion for fib/canSum needs memoization.