?
What will be the recurrence relation of the following code?
What will be the recurrence relation of the following code?
Int sum(int n)
{
If(n==1)
return 1;
else
return n+sum(n-1);
}
Int sum(int n)
{
If(n==1)
return 1;
else
return n+sum(n-1);
}
Join the Discussion
Login to post a comment or share your explanation.
Login