Big-O notation describes the affect structure growth has on an algorithm's effort.
It is not a measurement.
Big-O is qualitative not quantitative. Big-O is a broad grouping like choosing a T-shirt ("S", "M", "L").
Identifying iterations/recursion helps the analysis.
Use Big-O with other tools such as performance profilers (tools that make time measurements of running code).
Here are the most common Big-O notations (ordered from best to worst in relative efficiency):
- O(1) - Constant - (no iterations)
- O(log n) - logarithmic - (iterating over subset of collection)
- O(n) - linear - (basic iteration over collection)
- O(n log n) - logarithmic nested in linear (logarithmic operation nested in linear operation)
- O(n2) - quadratic - (e.g. loop in a loop)
Note: recursion would apply similarly to iterations
There are other less common notations such as O(n3) (hopefully rare).