Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Tail Recursion

Name: Anonymous 2011-10-19 21:09

How do i make this function tail recursive in java


public int fib(int n)
{
  return( n <= 1 ? n : fib(n-1) + fib(n-2) );
}

Name: Anonymous 2011-10-22 0:45

>>49
Blame the shitty x86 architecture for that. POWER6 is at 4.7 GHz and POWER7 is 4.25 GHz but will only get faster when POWER7+ comes out.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List