Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Help In Learning Algorithm Basics [closed]

I am learning algorithms and need you guys to help me. I am a beginner so forgive me if my question is not clear. Whiles am learning i am seeing something like NlogN, N^2 etc.. and something like that.

I don't really understand it clearly when it comes to checking the efficiency/performance of different algorithms using these notations. I understand Logarithms very well but the way they are been used in relation to checking algorithms performance makes me mad.

I am asking if someone can point me to a tutorial where such notations are been explained so that i can get the basics very well. I really want to understand them and am willing to learn.

Thanks for your help.

Kap.

like image 430
Kap Avatar asked Mar 09 '26 19:03

Kap


1 Answers

What you've described is called big O notation. Here is a guide explaining it.

An important thing to notice is that the notation ignores insignificant terms. If your algorithm takes 6X^2 + 3X + 12 seconds to execute, where X is the number of data points being processed, just call it O(X^2) because when X gets big, the 6 won't really make a difference, nor will the 3 nor the 12.

like image 93
nmichaels Avatar answered Mar 12 '26 09:03

nmichaels



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!