in reply to Re: Recursion problem
in thread Recursion problem
Yes it works, as long as your list is short.
If the list can be longer than your integer precision, you should use big integers and I think this is overkill: there are situations in which recursion is useless and more time consuming than an iterative algorithm (I'm thinking of the classical book example of calculating n!) but in others it can be the fastest/cleanest approach
Rule One: Do not act incautiously when confronting a little bald wrinkly smiling man.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Recursion problem
by Limbic~Region (Chancellor) on May 26, 2008 at 18:45 UTC | |
by psini (Deacon) on May 26, 2008 at 21:37 UTC | |
by Limbic~Region (Chancellor) on May 26, 2008 at 22:39 UTC |