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.
- O(2ⁿ)
- O(n²)
- O(n log n)
- O(n)
- O(log n)
- O(1)
Show answer & explanation
Correct order:
- O(1)
- O(log n)
- O(n)
- O(n log n)
- O(n²)
- 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.