Determining Efficiency

Big O Notation

The upper bound on an algorithm’s running time.

Instead of saying “this algorithm takes n steps”, we can measure things in the order of ns (“this algorithm takes O(n) steps”).

Big \Omega Notation

The lower bound on an algorithm’s running time.

Big \Theta Notation

Used when the upper and lower bound of an algorithm’s running time is the same.

Common Real-World O, \Omega, and \Theta Values

Most algorithms will boil down to these (replace O with \Omega or \Theta):