AI engineering glossary · Data structures algorithms

What is Big-O notation?

Big-O notation (also called Big O, asymptotic upper bound): A shorthand for describing how the running time or memory of an algorithm grows with input size n, keeping only the fastest-growing term and ignoring constant factors. It gives an upper bound and lets us compare algorithms independent of hardware.

Level: beginnerTopic: Data structures algorithms

Big-O notation: an example

Checking every pair in a list of n items takes about n*n steps, so it is O(n^2). Doubling n makes it roughly four times slower.

Related terms

More Data structures algorithms terms

Where you learn it

Big-O notation is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.