+ 10
Big O notation.
I know that talking about Big O notation isn't programming, but doing some excercises in web pages. I'm creating some algorithms to solve the problem, but now I'm curious about to know if my algorithm is good enough or not (regardless if it works). I have heard about Big O notation, but after searching in Google, isn't very clear about how to implement Big O notation to my algorithms. Is there some good Books about Big O notation Where I can learn it? Or some articles about it? Everything is welcome.
8 Antworten
+ 12
Check out the initial, compact lessons on it:
https://www.sololearn.com/learn/6362/?ref=app
+ 10
Hope this helps.
https://code.sololearn.com/WS8SBRFRVxcn/?ref=app
+ 9
https://www.sololearn.com/post/56971/?ref=app
+ 5
Algorithmic time complexity is concerned about how fast or slow particular algorithm performs. We define complexity as a numerical function T(n) - time versus the input size n. A given algorithm will take different amounts of time on the same inputs depending on such factors as: processor speed; instruction set, disk speed, brand of compiler and etc.
The way around is to estimate efficiency of each algorithm asymptotically. We will measure time T(n) as the number of elementary "steps" (defined in any way), provided each such step takes constant time.
+ 3
Big O is technically not something that you would "implement" in your code. It is more like a benchmark or measurement of the efficiency of your algorythm, to determine the number of operations and consequently memory usage of a program.
+ 3
nice
+ 2
Just to make it easy... Think of The "O" as the time each operation takes.
So Olog(n) just means O times log(n).
It appears to be a really easy concept, yet every explanation I've ever heard has been strangely complicated.
They also use log base 2 I believe. Not sure why, but I think it has to do with binary.
+ 1
Search for the book Design and Analysis of Algorithms...