Functions 3-25
so on do not require equal amount of time. This is specified by a numerical function called
complexity function expressed in terms of input size.
The time complexity of an algorithm can be explained by the following considerations:
Worst Case Complexity: For an algorithm, it is uncertain exactly how many operations will be
needed and so we estimate the upper bound of the operations for all inputs of a given size. This
estimate is called worst case complexity.
Best Case Complexity: When minimum number of operations is counted for the execution of
the algorithm, it is called best case complexity.
Average Case Complexity: Average case complexity of an algorithm is the function defined by
the average number of operations required for ...