Re: need help Recursion and iteration...


[Prev][Next][Index][Thread]

Re: need help Recursion and iteration...



On Tue, 22 Dec 1998 07:54:48 GMT, werner_huysegoms@my-dejanews.com
wrote:

>In article <367d657d.20892851@news1.qc.sympatico.ca>,
>  bmorrissNOSPAM@sympatico.ca (Benoit Morrissette) wrote:
>
>>  But there
>> exists some classes of algorythmic problems that can be solved
>> only through recursion ( graphs and trees ).
>
>Er.. no.  Every recursive program may be written in iterative form.
>It's not always trivial (as with the factorial), but it can be done.
>
>> And in many
>> cases, recursion leads to programs that are more readable,
>> easier to debug and faster to write at the cost of using
>> more memory and taking more time to run.
>>
>
>I second that.


Well, i cannot prove that some problems can be solved
only through recursion but i had to do once a full
database based on binary search trees and believe me,
it is a LOT easier with recursion!
{~;~}
 / \  Benoit Morrissette ( no relation with Alanis... )


References: