← Tech dictionaryLearn it properlyDSA tutorials — free, with diagrams, quizzes and a certificate
Data structures & algorithms
What is Big-O notation?
Also called: time complexity
Big-O notation describes how the running time or memory of an algorithm grows as the input size n grows, ignoring constant factors. It gives an upper bound on the growth rate, such as O(1), O(log n), O(n), O(n log n) or O(n²).
Example
Checking every pair in a list of n items is O(n²); looking up a key in a hash map is O(1) on average.