>> You're dismissing it because it sounds too simple, without trying any example.
well, to be fair, your original solution was incomplete. but I can see how the algorithm works, now. quite ingenious.
on a side note, I really wasn't sure if I would get many useful or intelligent responses from this thread. luckily, I was wrong!
many thanks to everyone that posted.