Asymptotic-Complexity
October 26, 2023UGC NET CS 2018 JUNE Paper-2
October 26, 2023Asymptotic-Complexity
|
Question 26
|
What is the solution to the recurrence T(n)=T(n/2)+n?
|
O(log n)
|
|
|
O(n)
|
|
|
O(n logn)
|
|
|
None of these
|
Question 26 Explanation:
The above recurrence is in the form of masters theorem.
a=1,b=2,k=1,p=0
=a<b k
=O(n)
a=1,b=2,k=1,p=0
=a<b k
=O(n)
Correct Answer: B
Question 26 Explanation:
The above recurrence is in the form of masters theorem.
a=1,b=2,k=1,p=0
=a<b k
=O(n)
a=1,b=2,k=1,p=0
=a<b k
=O(n)
