On Thursday 28 June 2007, Dave Korn wrote: > On 28 June 2007 14:40, Stephan Beal wrote: ... > > (In any case, both yours and Christoph's implementations are far > > more elegant than mine!) > > I'm not 100% sure about that myself... is it really more efficient > to recurse your way up the stack just in order to save yourself the > use of a temporary variable, rather than using a temporary and > iterating? Or do we just assume that the difference between > iteration and recursion will be swamped in the noise of what is > essentially a quadratic algorithm anyway?
That's an excellent point. i should have qualified my definition of "elegant" as "concise and easy to read." Not that yours is difficult to read, but so far i've found Christoph's solution to be the most "visually elegant" of the proposals. :) -- ----- stephan beal http://www.wanderinghorse.net
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
