What is Asymptotic Notation in Algorithms ?
In this blog we gonna see the comparison among the different time complexity in order the understand the Asymptotic notation.
Asymptotic Notation is a Mathematical term but as in Algorithms we are using function to find out the time & space complexity ,we are using this term here too.
Let’s start understanding this concept using Time complexity .
In my previous blog I mentioned that Time Complexity order overview is as follow, lowest shows minimum time required.
1<log n < √n< n < n log n < n² < n³ …< n^n
I am using the “overview” word because it may happen that you may find some value which is not listed above like n²logn , which is understandable that it will lie somewhere between n² and n³.
I am taking an example to show you how it works by putting different values of n which will help us in plotting the graph . You will find out that at some point the value is same but as we grow , we can see a drastic change in values.
And now if I plot graph corresponding to these values , graph will be somehow like this:
So, this arrangement of values represents Asymptotic notation where after a particular point point the value changes drastically .
I hope this comparison clears out how important it is to understand the complexity to choose a better algorithm