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-20 8:48

>>11
That's one of the most ugliest pieces of code i've ever seen

Name: Anonymous 2011-10-20 10:03

>>17
That is C/C++ baby! And you havent seen BOOST's "lambda" yet.

Name: Anonymous 2011-10-20 10:18

>>18
It's C, cretin. And Boost uses templates, not compiler-dependent bullshit.

Now kindly go back to /g/, where you clearly belong to.

Name: Anonymous 2011-10-20 13:55

>>29
Autists belong on /prog/.

>>11 is an awful person.

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