HELP!! Creating a perfect hash
807591May 13 2008 — edited May 18 2008I am looking for way to hash 27 different key words (strings), and all my ideas have failed miserably...
What I first attempted to do was find something different about the 27 different strings and convert the set of strings into a set of 27 unique numbers. With the 27 numbers I set my program into a loop trying different formulas and multiplying or dividing random numbers. I was successful into getting it down to %31 but couldnt get it any lower...
Where is my thinking wrong? I tried looking all over the web, but most of it is in C++ or just to advance for me to understand at this point of my java career. Can anyone help explain a commonly used algorithm in laments terms?
Thank you!!