Lec-3 Performance Analysis
Lec-3 Performance Analysis
(BCAE0106)
Presented by:
Akanksha
Assistant Professor
Dept. of Computer Engineering & Applications, IET,
GLA University, Mathura
Analyzing Algorithms
2
Analyzing Algorithms
The complexity of an algorithm f(n) gives the running time and/or the
storage space required by the algorithm in terms of n as the size of
input data.
Categorization of Complexity:
5
Space Complexity:
6
Space Complexity:
Auxiliary space: The extra space required by the algorithm, excluding the
input size, is known as an auxiliary space.
The space complexity considers both the spaces, i.e., auxiliary space, and
space used by the input.
Step 1 − START
Step 2 − C ← A + B +
10
Step 3 − Stop
Here we have three variables A, B, and C and one constant.
14