next up previous
Next: 1.2.1 Big Oh Notation Up: 1. Introduction Previous: 1.1.1 Four Fundamental Data Structures

1.2 Complexity of Algorithms

It is very convenient to classify algorithms based on the relative amount of time or relative amount of space they require and specify the growth of time /space requirements as a function of the input size. Thus, we have the notions of:
Time Complexity: Running time of the program as a function of the size of input
Space Complexity: Amount of computer memory required during the program execution, as a function of the input size