Let $T(n)$ be the function defined by $T(1) =1, \: T(n) = 2T (\lfloor \frac{n}{2} \rfloor ) + \sqrt{n}$ for $n \geq 2$.
Which of the following statements is true?
$T(n) = O \sqrt{n}$
$T(n)=O(n)$
$T(n) = O (\log n)$
None of the above
@ankitgupta.1729
@srestha
using floor or ceil make any difference in big O notation?
Asking not for this question but in general scenario does floor or ceil make any change in overall complexity?
@jlimbasiya
No.
You resolved all my doubts on solving the method by recursion tree method. Earlier I also think that cost of each level is same but when i tried to solve some question by taking this, few questions Iām not able to solve but now i understand what is the reason behind it...š
Answer is $B$.
using master method (case 1)
where a = 2, b = 2
O(n1/2) < O(nlogba)
O(n1/2) < O(nlog22)
@Satbir
Do you think this selected answer even correct?
64.3k questions
77.9k answers
244k comments
80.0k users