Suppose $T(n) =2T (\frac{n}{2}) + n$, $T(0) = T(1) =1$
Which one of the following is FALSE?
$T(n)=O(n^2)$
$T(n)=\Theta(n \log n)$
$T(n)=\Omega(n^2)$
$T(n)=O(n \log n)$
It is the recurrence relation of $Merge-Sort$. The time complexity of merge sort is $Θ(nlogn)$. The option (C) is false!
yes @Shubhdwivedi
Applying Masters theorem,
$T(n) = \Theta (n \log n)$
So, it cannot be $\Omega(n^2)$.
Hence, answer is (C).
watch first 20 min, you will understand all about notations
https://www.youtube.com/watch?v=P7frcB_-g4w
If you are not getting how Master theorem works step by step, you can refer this blog post:
https://devsathish.wordpress.com/2012/01/19/master-theorem-with-examples/
P.S. Not mine.
64.3k questions
77.9k answers
244k comments
80.0k users