> "Timothy Johnson" <[EMAIL PROTECTED]> said: > > Out of curiosity, is there a big performance increase using a recursive > algorithm like the one described versus an algorithm like below? (This is > part of something I was working on a while ago, and I wasn't using strict or > -w at the time, I'm still trying to train myself on that one :P)
Recursive algorithms are generally easier to write and easier to understand when they are used for operating on recursive data structures (e.g. trees). Writing non-recursive algorithms for operations on recursive data structures means keeping track of one or more push down stacks which can be error prone. It is a good idea to understand the relationship between stacks and recursion, since a stack is how recursion is generally implemented. But once you have gone thru the stack exercise, let the compiler and the run time system do the bookkeeping for you. -- Smoot Carl-Mitchell Consultant -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]