Algorithm Math & Complexity

Big O Notation

Big O gives an asymptotic upper bound on the growth of a function, commonly used for algorithm complexity.

Meaning

What Is Big O Notation?

Big O gives an asymptotic upper bound on the growth of a function, commonly used for algorithm complexity.

Big O gives an asymptotic upper bound on the growth of a function, commonly used for algorithm complexity.

Examples

Examples of Big O Notation

1Binary search runs in O(log n).
Understand

Formula and Key Points

Formula / rule
f(n)=O(g(n))
  • Know the definition and standard notation for Big O Notation.
  • Be able to recognise or compute big o notation in a small example.
  • Connect the concept to nearby topics in the same subject before using it in larger CSE problems.
CSE Connection

Why This Matters in Computer Science

Used to reason about running time, memory use, recursion, loop counts and the scalability of algorithms. The most common notation for communicating worst-case growth of algorithm time or memory.

FAQ

Big O Notation: Frequently Asked Questions

What is Big O Notation?

Big O gives an asymptotic upper bound on the growth of a function, commonly used for algorithm complexity.

Why is Big O Notation useful in computer science?

Used to reason about running time, memory use, recursion, loop counts and the scalability of algorithms. The most common notation for communicating worst-case growth of algorithm time or memory.