Re: using a tree to delete duplicate lines in a text



Franken Sense said:

<snip>

Are "collisions" items that end up in the
same bucket?

Either "yes", or "they would if you didn't stop them", depending on
how you handle - um - collisions. Some people, on encountering a
collision, move on to an empty bucket in a (hopefully!) robust and
predictable way. Others use a subsidiary data structure within the
bucket, eg a list, a tree, or even another hash table.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.