An algorithm is step by step mathematical process of solving a given problem. We have multiple algorithms to solve a given problem. Wisdom lies in choosing the right algorithm for your given problem definition.
Selecting the right algorithm depends on the nature of the problem, all possible inputs to the algorithm, the volume of data to be processed, time available to get the results and amount of hardware required.
We need tools to compare algorithms to make the right choice. One such tool is Asymptotic Analysis, which is used to compare algorithms based on the ir running time and space used.