Skip to content

Glossary: Data Structures and Algorithms

Big-O notation

Also written: Big-O, O(1), O(n), O(n²), O(log n), O(n log n), O(V + E), constant time, linear time, quadratic time, logarithmic time

A way to describe how the number of steps grows as the input size n grows, ignoring constants and smaller terms. O(1) stays flat, O(n) grows in step with the data, and O(n²) usually comes from a loop inside a loop.

Where the book teaches it

Related terms

Worst caseSpaceAverage case