Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Prove max(O(f(n)), O(g(n)))=O(max(f(n), g(n))
这确实有道理,但到目前为止我不知道如何实际证明它。
任何输入将不胜感激。
f(n) <= max(f(n), g(n)) g(n) <= max(f(n), g(n)) max(O(f(n)), O(g(n))) <= O(max(f(n), g(n)), max(f(n), g(n))) = O(max(f(n), g(n)))
请注意,使用的不等式并不严格。