Is there a difference between the statement “Worst running time of algorithm A” and “Running time of algorithm A is O (n)”?
What I think is “no difference” because in the worst case it is the peak runtime that the function can execute, O (n) means that the function is “limited”. Both have the same meaning.
Hope my logic is correct.
There is a difference.
The O (f) algorithm is not exact: you have to say that alogirthm is O (f) in its best / worst / random case. You can say that it is O (f) when the best, worst and boring are the same, but it is not so often.
, (, quicksort), , . , quicksort O (N ^ 2), , O (N * log N) ( , ).
, . O (N) O (log N) , O (1) . Splay tree Finger trees .
, , , . , , 5 100 , 10 200 .., O (N), . 5 * 5 = 25 200 , O (N ^ 2). " ", , .
, O - , , O (N ^ 2) ( N - , N * N , , , ). Ω (, ) Θ (, ).
(, Quicksort) , , - O (N ^ 2), , O (N log N).
There is a huge difference between these lines of words. “Worst execution time of Algorithm A” is a noun sentence; it makes no statement at all. "The execution time of algorithm A is O (n)" is a sentence telling us something about A.
Source: https://habr.com/ru/post/1772414/More articles:Оберните тегивокруг с помощью href= img src? - jqueryScaleGestureDetector does not detect gesture - androidFile → Open Website in MonoDevelop? - asp.netDoes Int32.TryParse (String, Int32) include an int argument on error? - .netOverride Reset form behavior when data is updated via ajax - javascriptCut audio file into ten segments - pythonDTO Cloning in C # - c #Find all sets that are a subset of a superset in SQL - sqlDoes Windows Phone 7 support asynchronous programming? - asynchronousCan I test when IOS4 AVPlayer seekToTime completes? - ios4All Articles