|
From: Ioannis V. <no...@ya...> - 2001-11-13 21:14:15
|
If it was for academic purposes to learn recursion, i agree with you too. :) Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: Williams, Timothy W. [mailto:TIM...@sa...] > Sent: Tuesday, November 13, 2001 10:24 PM > To: 'Ioannis Vranos'; Dev-C++ > Subject: RE: [Dev-C++] Efficiency > > > Good grief! I concur too. Let me explain my point a bit > clearer here: o I assumed he was constrained to solving the > problem recursively. o I made that assumption because a > frequently used method of teaching recursion includes using a > simple problemset, ie. fibonacci. o This is mainly because > once situations are complex enough to need recursion, if a > person doesn't already know it then they are stuck, for > instance learning how to implement a B+Tree and traversing it > is a good time to *already* know recursion. > o If all he wanted was a fast way to compute the fib > sequence, he probably should have asked "how can I make this > funcion more efficient" rather than "how can I make this > recursive function more efficient" then I would have been > less likely to make assumptions about his constraints. > o He could clear it up by letting us know what his > constraints were or were not. > > I'm not arguing for a recursive solution in this case if he's > doing it for any *real* purpose, although I must say I didn't > see any significant performance difference for any relatively > small n. Just out of curiousity how did you initially learn > recursion? I'm guessing it wasn't implementing a tree > structure for the first time, right? Probably the fib > sequence, I think it's most ever intro to CS book out there. |