From an efficiency standpoint, recursion is seldom the
best solution
in the real world as opposed to an iterative solution.
Only from a very narrow "runtime cycle count (and/or RAM usage, etc) is
everything" standpoint. When you consider that most code is not
time-critical and that the iterative form is usually significantly
harder for humans to get their heads around, it is usually better to
burn more runtime cycles for the sake of lower maintenance costs.
Obviously, there are exceptions. That's why I used words like "most"
and "usually".
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B