【发布时间】:2020-09-03 18:11:12
【问题描述】:
我有一个重复关系,如下所示:
T(n) = 2T(n/2) + nlog(n)
我正在使用递归树方法来解决这个问题。最后,我想出了以下等式:
n(log(n/2^0) + log(n/2^1) + log(n/2^2) + ....+ log(n/2^(log n)))*
在求解这个方程时,我得到的时间复杂度为 n(log n)^2 但是通过使用 master's theorem 我得到了时间复杂度为 n(log(log n)) 请帮我找出我的错误。
【问题讨论】:
标签: algorithm time-complexity recurrence logarithm master-theorem