Learning Assistance Algorithm Basics

I am learning algorithms and need you guys to help me. I am new, so forgive me if my question is not clear. While I'm studying, I see something like NlogN, N ^ 2, etc. And something like that.

I don’t quite understand this when it comes to checking the efficiency / performance of various algorithms using these notations. I understand the logarithms very well, but the way they were used in relation to checking the performance of the algorithms makes me crazy.

I ask if someone can point me to a textbook in which such designations were explained so that I can very thoroughly understand the basics. I really want to understand them and am ready to learn.

Thank you for your help.

Kap.

+3
source share
5 answers

These are just functions that receive the number of input elements and return the number of operations that are required to complete the algorithm (as a rule, they return the limiting factor of the algorithm, and not a specific function. More on this here ).

+1
source

What you described is called a big O note . This explanation is explained here.

, . 6X ^ 2 + 3X + 12 , X - , O (X ^ 2), , X , 6 , 3 12.

+4

. .

/ MIT, .

, , , ..

+2

Big-O. - .

O (n ^ 2) , n ( n ), n ^ 2 (Big -O - ​​ , ). , for for, , 1 n.

O (nlogn) . , (, ).

, , , - O (3n), n 3 , O (n).

Many of the others have already posted good reading links.

0
source

Source: https://habr.com/ru/post/1771376/


All Articles