Formal Definition

Big-O Notation

Technically, can be any function. , and are all valid big-O functions, but the closest upper bound is the best option.

This definition has the implication that if but , then is always faster than .

Examples

Examples