Search:

Type: Posts; User: Norm

Search: Search took 0.18 seconds.

  1. Re: Recursion ouput is not coming for value more than 40.

    Have you tried an iterative approach vs a recursive one?

    Your code doesn't follow the equations:

    f(1)=2

    else if(n==1){

    return 1;
  2. Re: Recursion ouput is not coming for value more than 40.

    Your algorithm must be doing a lot of recursive calling.
    Where did you get the code? Did it give an expression or description of the number of calls it makes.
  3. Re: Recursion ouput is not coming for value more than 40.

    Have you waited long enough for the program to finish?
Results 1 to 3 of 3