Re: Fast union/intersection of two sequences?

Steven D. Majewski (sdm7g@virginia.edu)
Tue, 24 Jan 1995 10:04:41 -0500 (EST)

How about using a dictionary instead of a list ?

I haven't compared the time, so this may be somewhere
where my intuition misleads me. I've have used it just
because a dict, because of non-duplicate keys, seemed
in some cases, a better mapping of sets than lists.
Since you don't require a key<->value mapping, (you're
just using a dict to take advantage of the hashing ) you
can make all the values null, or probably better, make the
value == key.

---| Steven D. Majewski (804-982-0831) <sdm7g@Virginia.EDU> |---
---| Computer Systems Engineer University of Virginia |---
---| Department of Molecular Physiology and Biological Physics |---
---| Box 449 Health Science Center Charlottesville,VA 22908 |---