Big-O Notation and Orders of Growth · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Big-O keeps only the shape

Computing · Algorithms & Data Structures · ages 16-17
Name ______________________   Date ____________
  1. Which order sits between O(n) and O(n squared)?

    • O(1)
    • O(log n)
    • O(n log n)
  2. What is 3n + 7 in big-O form?

    • O(3n + 7)
    • O(n)
    • O(7)
  3. Why are constants dropped in big-O?

    • Machine details, not the growth
    • Constants are always zero
    • Mathematicians dislike small numbers
  4. Input doubles under an O(n squared) method. Roughly how many times the work results? Type the multiplier.

    Answer: ______________

  5. Input doubles under an O(n) method. What happens to the work?

    • It stays flat
    • It doubles
    • It quadruples
  6. Big-O describes an upper bound on growth for large n.

    Circle one:   True   False

  7. A student says O(log n) grows faster than O(n) because logs look scary. What is the error?

    • Logs grow slower
    • O(n) is always flat
    • The two orders are identical
  8. An O(n squared) method runs on n = 1000, then n = 2000. The constant in front is unknown. What can you still predict?

    • It quadruples; k cancels
    • The work stays exactly the same
    • Nothing without the constant
LightMySky · lightmysky.comW1-mt_mkqgxhJ509-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Big-O keeps only the shape W1-mt_mkqgxhJ509-s1

  1. O(n log n) · The ladder runs O(1), O(log n), O(n), O(n log n), O(n squared).
  2. O(n) · Drop the constant and the factor, leaving O(n).
  3. Machine details, not the growth · Constants stop mattering beside growth as n gets large.
  4. 4 · Doubling n multiplies n squared by four.
  5. It doubles · Linear work grows in step with the input.
  6. True · It promises the work never grows faster than the named curve.
  7. Logs grow slower · Logarithmic work adds about one step per doubling, far slower than linear.
  8. It quadruples; k cancels · The constant scales both runs equally, so the ratio stays four.
Worksheet · LightMySky