Algorithm complexity is a function f(n) which measure the time and /or space used by that algorithm in terms of input size n.