Big-O Notation

A measure of the efficiency of algorithms

Last Update Unknown

Big-O Notation

Space Complexity – How much memory space is needed

Time Complexity – How fast a program runs.

Algorithmic time complexity always refers to the worst case scenario.

• Worst-case complexity e.g., Maximum

• Best-case complexity e.g., Shortest possible time

• Average-case complexity



n! (n-factorial) is the number of permutations of n

e.g.    5! = 5x4x3x2x1 = 120


Intractable: The problem can be solved but it takes an unreasonable amount of time to solve. (i.e., the travelling salesman problem)

Heuristic algorithm: Finds a solution that might not be the best and will consider less constraints to cut down the search space.