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-21 18:44

>>27
It was named 'Boost' to ``Boost the programming of C++ apps''.

But honestly, and I actually love C++, Boost makes programming tedious.

Mostly because boost got an obnoxious, pointlessly templated API, and because the people behind boost think that 'header-only library' are the OMG BEST THING EVUR. But only if you feel like waiting 2 hours each time you recompile your ``Hello World''.

Name: Anonymous 2011-10-21 19:57

>>46
Even in that case the Boost people would find a way to slow down compilation by 10000%. Seriously.

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