O Notations

O -notation is the most common notation used to express an algorithm’s performance in a formal manner. Formally, O -notation expresses the upper bound of a function within a constant factor. Specifically, if g (n) is an upper bound of f (n), then for some constant c it is possible to find a value of n, call it n 0, for which any value of n ≥ n 0 will result in f (n) ≤ cg (n). Continue reading