Thread: Recursion
View Single Post
Old Jan 20th, 2005, 9:24 PM   #3
EdSalamander
Programmer
 
EdSalamander's Avatar
 
Join Date: Dec 2004
Location: Tucson, AZ, USA
Posts: 80
Rep Power: 5 EdSalamander is on a distinguished road
Send a message via AIM to EdSalamander
Both recursion and iteration have their upsides and downsides. Recursion is less efficient but more versatile (and sometimes the only way to write an algorithm). Iteration on the other hand is simpler (in my opinion), sometimes faster, and usually more efficient (especially in terms of stack usage), but is much more limited in ability and scope. I generally prefer iteration, but like Tama said, don't restrict yourself by leaning to strongly one way or the other.
__________________
I can pick my friends. And I can pick my nose. So, why can't I pick my friend's nose?
EdSalamander is offline   Reply With Quote