Performance Analysis an Algorithm

The Efficiency of an Algorithm can be measured by the following metrics.
  • Time Complexity
  • Space Complexity

Time Complexity

The amount of time required for an algorithm to complete its execution is its time complexity. An algorithm is said to be efficient if it takes the minimum (reasonable) amount of time to complete its execution.

Space Complexity

The amount of space occupied by an algorithm is known as Space Complexity. An algorithm is said to be efficient if it occupies less space and required the minimum amount of time to complete its execution.