Pascal Bourguignon <usenet@informatimago.com> wrote:
+---------------
| What about some basic testing?
...
| ((WE WANT TO OMIT FROM AND SYMBOLS)
| (WE WANT HERE AND SYMBOLS))
+---------------
IMHO the initial problem specification [absent using the
initially-presented solution as code-as-specification]
was too vague to be able to distinguish between those
solutions. It also failed to specify what should be done
with *three* (or any odd number) of an item, or with more
than one pair (any even number >2) of the same item.
As someone else said, absent such a spec, both greedy
and non-greedy algorithms could be valid, and both
left-to-right and right-to-left algorithms could be valid.
But then, this group certainly knows that a comprehensive
spec is much harder than a singleton implementation... ;-} ;-}
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607