What is Big O Notation?
Big O Notation describes how the performance of an algorithm changes as the input size
grows.
Why is it important?
It helps compare algorithms, choose efficient solutions, and optimize code performance.
Common Types
O(1) - Constant (Fastest)
O(log n) - Logarithmic
O(n) - Linear
O(n log n) - Linearithmic
O(n^2) - Quadratic
O(2^n) - Exponential (Very Slow)
Graphical Representation
The following graph shows how different Big O complexities grow: