The analysis of an Algorithm is to study the performance of an algorithm. The performance of an algorithm can be measured based on the time and the space they require to execute.
Why is it so important?
For a given problem there might be multiple solutions and can be required to use different algorithms and data structures. As a developer we need to verify which is better and the best fit for our requirement.
Time taken by a program depends upon the factors like:
- The processing power of the machine (Computer) and
- Programing language
Things to remember:
- Programming languages like C, C++ are compiled languages whereas Java, Python are interpreted languages.
- Interpreted languages are executed line by line by interpreter so it typically runs slower.
By overcoming the above factors to analyze the algorithm we have a solution called asymptotic analysis.
Leave a Reply