Algorithm Analysis

An algorithm is the step-by-step unambiguous instructions to solve a given problem.

In CS, multiple algorithms are available for solving the same problem (for example, a sorting problem has many algorithms, like insertion sort, selection sort, quick sort and many more).

In the traditional study of algorithms, there are two main criteria for judging the merits of algorithms:

To compare algorithms, we can define a few objective measures:

The rate at which the running time increases as a function of input is called rate of growth.

Asymptotic Notations

To analyze an algorithm we need some kind of syntax, and that forms the base for asymptotic analysis/notation.

Asymptotic notations are mathematical tools to represent the time complexity of algorithms for asymptotic analysis.

The following 3 asymptotic notations are mostly used to represent the time complexity of algorithms: