[Edu-sig] understanding recursion
kirby.urner at gmail.com
Mon Feb 12 19:59:49 CET 2007
> Another problem (both with Kirby's implementation and mine) is that you
> lucky": if the user specifies the smaller number and the larger number in
> the "wrong" order, the algorithm magically swaps them for the next
> recursion. When tackling other recursion problems, students probably won't
> be able to count on such luck.
Yes I agree that that's fun, about the automatic swapping.
Also, it shouldn't escape note that *all* of these recursive
solutions, from elegant to more transparent, seem harder
to grok than the non-recursive version first given, which I
credit to Guido.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Edu-sig