The "Unfriendly Algorithms for Masters" bindings in the tutorial say that the merge time sort is O (n ^ 4). Is this statement correct?
Solution: Yes. This statement is technically correct, since O (n ^ 4) gives only the upper one for how long the algorithm has been running. However, his unpleasant useless answer, as a tight borderΘ(n log n).
Θ(n log n).
I do not quite understand what is said in this decision. How can O (n ^ 4) be right?
The Big O designation is the worst-case upper case for algorithm execution time.
O (n ^ 4) , , , .. Mergesort , O (n ^ 4).
, O (n log n), " "
Big-O - , , , (foo) . Little-O - , , (foo). , mergesort O (n ^ 4), , Theta (n log n). , mergesort o (n ^ 4), , , .
, -O , big-theta , , .
Source: https://habr.com/ru/post/1772309/More articles:Asset Management - c #Running different code depending on which version of Net Framework is installed - c #Text Font - mathRegion offset using google maps - google-maps.Net (C #) Enum rewritten in java - javaAlertDialog setSingleChoice without switches - androidC - wanted to know the maximum amount of memory allocated in the program - cMaven combat plugin cannot exclude parsed libraries in military format - javautf-8 encoding a std :: string? - c ++rails button_to does not set the class correctly - ruby-on-railsAll Articles