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.
在解决重复问题时可以放弃较低的术语吗,就像在这种情况下我决定放弃 O(logn).
写得不好请见谅!这是我解决重复问题的尝试:
O(log n) + n = Theta(n)您可以使用 Master Theorem重写并继续您愉快的方式来获得Theta(n).
O(log n) + n = Theta(n)
Theta(n)
如果您想要一个更好的界限,您可以使用替换方法来验证T(n) = 3n/2 + c log^2 n某个固定常数。c
T(n) = 3n/2 + c log^2 n
c