I'm deeply sorry for this, I don't know if it's the appropriate place to post this but I just can't figure out what's the time complexity of this algorithm:
int fun(int n)
{
int j = 10;
while( j < n)
j+= sqrt(j);
return j;
}
I know that at the $k^{th}$ iteration we have $f(k)=f(k-1)+\sqrt{f(k-1)}$, with $f(0)=10$, I tried solving this function, but I couldn't find any way to do so.
You can see that the second derivative of the function is a constant value, so you can approximate it with a quadratic function.
The values for $a$ and $b$ in the quadratic function take on values of around $0.00001$, so $$f(n) \approx 0.00001n^2+0.00001n+10$$