View Single Post
Originally Posted by curt.clifton View Post
You're definitely right about not overlooking the built-in filtering capabilities, but neither should we ignore a recursive solution, especially when it's more efficient.
Yes, my personal preference is for recursion too - something very elegant and pleasing about it. Here I would probably go for the recursion + where query option.

For a programmer in a hurry, however, the brief non-recursive code might give a good trade-off between programming time and run time. It's certainly quite easy to understand and maintain.

Generally, I think this kind of talmudic debate is quite productive.
It explores the search space and the cost/benefits pretty thoroughly, and one finds things that one might otherwise have overlooked, and which might prove useful later ...

I look forward to the next one :-)


Last edited by RobTrew; 2010-05-31 at 11:47 PM..