单选题:The recurrent equations for the time complexities of programs P1
The recurrent equations for the time complexities of programs P1 and P2 are: - P1: $$T(1)=1$$, $$T(N)=T(N/2)+1$$; - P2: $$T(1)=1$$, $$T(N)=2T(N/2)+1$$; Then the best conclusion about their time complexities is: A.they are both $$O(logN)$$ B.$$O(logN)$$ for P1, and $$O(N)$$ for P2 C.they are both $$O(N)$$ D.$$O(logN)$$ for P1, and $$O(NlogN)$$ for P2 答案:B