問題詳情

4. Determine the tightest big-O complexity of the recurrence:


(A) O(1)
(B) O(n)
(C) O(nlogn)
(D)O(n2)
(E) O(n3)

參考答案

答案:[無官方正解]
難度:計算中-1
書單:沒有書單,新增

用户評論

p_p971】評論

Ans: (D) O(n^2)By Master Theorem:T(n) = 2T(n/2)+n^2, 得知 a=2, b =2, d=2.使得, d > log_b^a, => 2 > 1,故, T(n) = O(n^d) = O(n^2)