递归大师法求复杂度O
T(n) = aT(n/b)+f(n)
(1)对于某常数e>0,有f(n)=O(n^(logba-e)),则T(n) = O(n^logba)
(2)如果f(n)=O(n^(logba)),则T(n) = O((n^logba)*lgn)
(3)对于某常数e>0,有f(n)=Ω(n^(logba+e)),且对常数c<1与所有足够大的n,有af(n/b)<=cf(n),则T(n) = O(f(n))
posted on 2012-04-15 22:10 yukl1n 阅读(117) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 yukl1n Powered by .NET 9.0 on Kubernetes