Big 'O' Notation : Big O notation is used to describe the performance or complexity of an algorithm. For a given function g(n), it is denoted by O(g(n)) the set of functions
O(g(n)) = {f(n) : there exist positive constants c and n0 such that
0 < f(n) < cg(n) for all n > n0}.
Two factors which determine the complexity of an algorithm :
(1) Time Complexity :
The amount of computer time, algorithm needs to run to completion.
(2) Space Complexity :
The amount of memory, algorithm needs to run to completion.