Complexity analysis

double fun (int n)
{
int i;
double sum; if (n = = 0)
return 1.0; else
{
sum = 0.0;
for (i = 0; i < n; i++) sum += fun (i);
return sum; }
}
The time complexity of the above function is: (1) O(1)
(2) O(n) (3) O(n!) (4) O(nn)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Sir I am not able to see the solution to the problem that you have provided you please resend it