Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HELP!! Creating a perfect hash

807591May 13 2008 — edited May 18 2008
I 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!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2008
Added on May 13 2008
32 comments
653 views