【发布时间】:2012-03-21 23:15:28
【问题描述】:
我一直在查看这种重复,并想检查我是否采取了正确的方法。
T(n) = T(n^(1/2)) + 1
= T(n^(1/4)) + 1 + 1
= T(n^(1/8)) + 1 + 1 + 1
...
= 1 + 1 + 1 + ... + 1 (a total of rad n times)
= n^(1/2)
所以答案将是 n^(1/2) 的 theta 界
【问题讨论】:
-
Verify it 与 Wolfram Alpha。
标签: algorithm math big-o analysis recurrence