First of all, how can we measure performance of any algorithm? We can implement algorithm and run it on computer, measure the time and space taken by program and gauge the performance. What's wrong with this method? There are two many variables which can affect the run time or performance of algorithm like what kind of machine it is running on, what is accuracy of the measurement, implementation language used, proficiency of programmer etc. To avoid these problems, computer science has a notion to represent run time or complexity of an algorithm known as Asymptotic notation.
Read full article from Algorithms and Me: Complexity Analysis : Asymptotic Notation
No comments:
Post a Comment