+ 2

What is big o notataion


17th Jun 2018, 9:03 PM
Frank - avatar
4 Answers
17th Jun 2018, 9:04 PM
Michael55555 - avatar
+ 1
thank you also is it a equasion if so what do the variables mean
17th Jun 2018, 9:07 PM
Frank - avatar
+ 1
So big O notation is one of several notations used to mesure of an algorithms effiency. So imagine you represent how the time complexity of a given algorithm grows as the input size grows. Lets say this algorithms functiom was f(n)=2n^2+5. What big O and the other notations allow us to do is provide generalizations for these functions. Big O specifically represents the upper bound. Immagine your graph your function for the algorithm and the function n^2. As both of the lines for the functions approach infinity there is a number you can multiply n^2 by so f(n) has it as an upper bound. So we can say f(n) =O(g(n)) where g(n) = n^2. Essentially what this means is there exists a positive constant c and x such that 0<=f(n)<=cg(n) for n>=x.
17th Jun 2018, 10:33 PM
Haon1919 - avatar
big o notation is a measure of a given algorithms time efficiency relative to the size of its input it measures the worst case performance of an algorithm and ignores constant factors
18th Jun 2018, 6:08 AM
Rational Agent