What is the time complexity of the following recursive function
int DoSomething(int n){
if(n<=2)
return 1;
else
return (DoSomething(floor(sqrt( n) )) + n);
}
Options are:-
The time complexity function is (ignoring floor
as it is asymptotically irrelevant):
We need to find m
when the algorithm terminates, i.e. when: