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.
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
- Big-Omega notation
- Big-Theta notation
- Binary search
- Binary search tree
- Binary tree
- Bipartite graph
- Bloom filter
- Breadth-first search
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.