Complexity of an Algorithm
An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorithm depends
upon following consideration:-
1) Time Complexity
2) Space Complexity