Hi Rob,
I tested this function so I'm fairly sure it's correct.
Yes, that's why I said I was dense ;)
Perhaps it would be better to rework the function for efficiency. I'm pretty sure it does the right thing though...
Thanks for the explanation. Yes, you're right. It appears to do what it says it does, and it has the (dubious) benefit of having predictable runtime: its runtime is never better than the worst case.
--Juan
____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/