Priori & Posteriori Analysis.

I am an open Source enthusiast, Love to work on long-drawn projects with my folks, Solving problems always excites me.
Before Getting into the Priori and Posteriori Analysis, let us first understand what are Algorithms and why we need to analyze them.
Algorithms
In simple words, An Algorithm is a step by step instructions to solve a given problem.
Why we need to analyse the Algorithms.
To solve a given problem, there could exist a plethora of ways, but we need to find the best one out of those, that's why the analysis of the algorithm is necessary.
Priori Analysis.
- As the name suggests it is done before the execution of the algorithm on a system.
- It is a theoretical analysis of the algorithm, Hence it is independent of the configuration of the system.
- The results of the Priori analysis would be the same on every machine.
- It generates the approximate statistics of the Algorithm in terms of Time & Space Complexity.
- The Priori Analysis is done using Asymptotic Notation.
Posteriori Analysis.
- As the name suggests it is done after the execution of the algorithm on a system.
- This analysis is dependent on the configuration of the system. The Program would execute faster on M1 >> i7 >> i3 >> Pentium.
- This is dependent on the programming language, If the Algorithm is written in C++ it would execute faster comparing it to the algorithm written in Python language.
- It generates the actual statistics of Algorithms.