Jump to content

Wikipedia talk:Algorithms on Wikipedia

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Alan D (talk | contribs) at 01:25, 12 December 2001. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

I can appreciate the emphasis on iteration versus recursion, as recursion is not taught to some people.

I don't agree that iteration is always preferable. A recursive algorithm that searches a binary tree is simpler

to understand, requires less book-keeping in variables, and is in general, preferable when explaining to a neophyte.

I think there are an entire class of problems that are similar. --BenBaker


I'm aware that recursion vs. iteration is one of more controversial of hints listed.

There is certainly class of problems are much easier to solve using recursion than iteration.

That is a hint for problems that can be solved equally easily with both methods (like fibonacci).


There is also a problem that various people find either of methods "simpler to understand".

There's some point in providing both implementations, so both groups can find easy-to-understand algorithm.


Probably some weaker wording should be used. --Taw


Iterative where immediately apparent would be nice. On the other hand, if its a problem that lends itself to recursion, no reason not to. programming is complicated, there's no two ways about it.


BTW, Even with iterative constructs available in LISP, I tend to go recursive just because the language lends itself to it, but in C I go iterative if I can help it. Something to think about... --alan d