Analysis of Algorithms
Why do we need to analyse algorithms?
Well,every algorithm uses up resources and to figure out which algorithm is best in its class , we need to find out which algorithm takes up minimum resources while producing the desired results .You might wonder :
There must be some way else to analyse and compare algorithms like based on the time it takes to execute, but that is a comparison that is machine dependent . The time taken by an algorithm will depend on the processor of the computer its being executed on . Hence , asymptotic analysis of algorithms is the best way to analyse algorithm.
How to analyse algorithms?
To analyse algorithms we use "Big-O" notation, here is a video by Harvard explaining Asymptotic NotationAnd here is an incredible text tutorial - Analysis
Comments
Post a Comment