Re: data structure for strings

From: Marc Tardif <intmktg_at_Gloria.CAM.ORG>
Date: 2000/07/24
Message-ID: <Pine.LNX.4.10.10007240855010.16350-100000_at_Gloria.CAM.ORG>#1/1


> On Sun, 23 Jul 2000 20:59:46 -0400, Marc Tardif <intmktg_at_Gloria.CAM.ORG> wrote:
> >Any other ideas would be much appreciated.
>
> (Perfect) Hashfunctions ?
>
What are "perfect" hashfunctions? I tried using a simple hash function with a 131 (closest prime number) hash size. In the end, there were about as many duplicates in the hash table as if I simply used the first character of each of the 130 words in an array. Problem with this is that my worst case scenario has 10 words beginning with the same character, which is likely to slow me down.

Anyways, please provide more information about this "perfect" hashfunction you mention. If too long or complicated, references would be much appreciated. Received on Mon Jul 24 2000 - 00:00:00 CEST

Original text of this message