---
title: "Big-O Notation and Orders of Growth"
description: "Describing how the work an algorithm does grows with the size of its input, keeping only the term that dominates and dropping constants. It gives O(1), O(log n), O(n), O(n log n) and O(n squared) as a"
canonical: https://lightmysky.com/learn/computing/big-o-notation-and-orders-of-growth-mt_mkqgxhJ509
source: https://lightmysky.com/learn/computing/big-o-notation-and-orders-of-growth-mt_mkqgxhJ509.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Big-O Notation and Orders of Growth

Describing how the work an algorithm does grows with the size of its input, keeping only the term that dominates and dropping constants. It gives O(1), O(log n), O(n), O(n log n) and O(n squared) as a way to compare methods at any scale.

Subject: Computing · Area: Algorithms & Data Structures · Ages 16 to 17
Page: https://lightmysky.com/learn/computing/big-o-notation-and-orders-of-growth-mt_mkqgxhJ509

## Ready when they can

- Turn an operation count such as 3n + 7 into its big-O form and say what was dropped and why
- Put O(1), O(log n), O(n), O(n log n) and O(n squared) in order of growth
- Predict what happens to the work when the input doubles, for each of those orders

## Lesson: Big-O keeps only the shape

Big-O notation keeps only the shape of the growth and throws away the details, to compare methods on a huge class list. Turn 3n + 7 into O(n): drop the 7 and drop the 3, because for large inputs the n term decides everything. Constants reflect the machine and coding details, not the algorithm, and they stop mattering beside growth as n gets large.

Five orders cover most methods you meet. From slowest to fastest growth: O(1) stays flat, then O(log n), then O(n), then O(n log n), then O(n squared). Linear search grows in step with the list while binary search barely notices it getting longer, which is why one is O(n) and the other O(log n).

**Example.** Predict doubling to feel each shape. If the input doubles, O(1) work stays flat, O(log n) needs about one extra step, O(n) work doubles too, and O(n squared) roughly quadruples since doubling n multiplies n squared by four. Saying binary search is O(log n) promises its work never grows faster than a logarithmic curve.

Big-O promises an upper bound on growth: the work never grows faster than the named curve for large n. That promise is what lets you compare algorithms fairly at any scale. Big-O summarises an operation count, so there must be a count to summarise before the notation means anything.

**Recap.** Drop the constants, name the shape, predict the doubling.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Standard Form](https://lightmysky.com/learn/mathematics/standard-form-mt_GbZZ2xjBTt)
- [Counting Operations to Compare Algorithms](https://lightmysky.com/learn/computing/counting-operations-to-compare-algorithms-mt_JkN961niFG)
- [Geometric Sequences and Common Ratios](https://lightmysky.com/learn/mathematics/geometric-sequences-and-common-ratios-mt_NDnbJm2hTY)

## Opens up

- [Randomised Algorithms and the Probabilistic Method](https://lightmysky.com/learn/computing/randomised-algorithms-and-the-probabilistic-method-mt_4ShN_WlT0-)
- [Asymptotic Notation Made Precise](https://lightmysky.com/learn/computing/asymptotic-notation-made-precise-mt_B0Z6Syy8Ve)
- [Quadratic Sorts: Bubble and Insertion](https://lightmysky.com/learn/computing/quadratic-sorts-bubble-and-insertion-mt_cBUIBa15jQ)
- [Linked Lists and Nodes That Point](https://lightmysky.com/learn/computing/linked-lists-and-nodes-that-point-mt_HvY7_-M2Zj)
- [The Halting Problem: A Task No Program Can Do](https://lightmysky.com/learn/computing/the-halting-problem-a-task-no-program-can-do-mt_KeuKGHFWqr)
