All options have different complexities. i.e.
$A) \:O(m^2) \:\: B) \:O(m^3)\:\: C) \: O(m^{3.5}) \: \:D) \: O(m^4)$
So, We can get time complexity T(n) from the recurrence relation and match with options. We ignore floor for worst case time complexity calculation.
$T(n+1) = T(n) + \sqrt{n+1}$
$Put\: n +1 = m^2$
$T(m^2) = T(m^2 - 1) + m$
$Put\: m^2 = p \:\: -(2)$
$T(p) = T(p - 1) + \sqrt{p} \:\:\: -(1)$
Here we have 2 methods to solve:
1st Method:
Using Subtract and Conquer(link) you will get :
$T(p) = O( p^{1.5+1} ) = O(p^{2.5}) = O(p\sqrt{p})$
$Put\: p = m^2 \:\: (using \: (2))$
$T(m^{2}) = O(m^{2} * m) = O(m^{3})$
$So\: B) \: is\: answer.$
2nd Method:
The recurrence relation (1) is sum of first p square root numbers.
Although we have floor of square root of numbers we are finding worst case time complexity so floor won't matter here.
$i.e. \: T(p) = \sqrt{1} + \sqrt{2} + ... + \sqrt{p}$
By Ramanujan’s formula for sum of the square roots of first n natural numbers (link for proof):
$T(p) = \frac{2}{3} . (\:(p-2) \sqrt{p+1} - 2\sqrt{2}) + 1$
$\therefore\: T(p) = O(p\sqrt{p})$
$Put\: p = m^2 \:\: (using \: (2))$
$T(m^{2}) = O(m^{2} * m) = O(m^{3})$
$So\: B) \: is\: answer.$