1. ## Hash Tables

Hello everyone i´m just getting started and i want to say thanks to all of you that reply to my thread!!
Now the thing is, i´m doing a school project, and i´m not very experienced at C languange programming but i heard about hash tables and and hash functions would anyone give me some info about that and where i can find some hash functions !!

2. welcome to AO HUGOBOSS ...
have u tried to visit cprogramming.com ? many thread had been posted here ( in AO forum ) you can see whole thread and you will get what you need.
And about Has Tables you can find the tutorial at http://vergil.chemistry.gatech.edu/r...ial/lists.html
http://users.actcom.co.il/~choo/lupg...sh-tables.html
http://xml-lit.sourceforge.net/doc/indexs05.html

good luck

3. Hash table are often used with list to speed up search. The hash function depends on the data you work with. For example you work with words. The hash function can return a number between 0 to 25 according to the first character of the word. So you have the hash table (an array of 26) and after 26 list for the words. The hash function can also be the sum of the ascii characters of the worlds.

You can find an example with C source Here
or an other one Here.

and more : techiwarehouse.com

5. Originally posted here by Ghostdog
Hash table are often used with list to speed up search. The hash function depends on the data you work with. For example you work with words. The hash function can return a number between 0 to 25 according to the first character of the word. So you have the hash table (an array of 26) and after 26 list for the words. The hash function can also be the sum of the ascii characters of the worlds.

You can find an example with C source Here
or an other one Here.
Wrote a Hash program that hashed based off the first letter and my TA (teaching assistant) gave me credit for the lab but told me that 26 base hash was not very good. I am speculating that it would be better to hash on fewer letters (maybe like a telephone hash shifting 2 places to the left). But I never followed up with the TA so I'm not sure where he was coming from. It might a performance issue. Would love to get the take of others.

Cheers,
-D

6. heres another nice URL

C Library Functions

http://www.doc.ic.ac.uk/~mac/manuals...hpux.man3.html

7. dspeidel said

Wrote a Hash program that hashed based off the first letter and my TA (teaching assistant) gave me credit for the lab but told me that 26 base hash was not very good.
This was just an example of a very simple function. The best hash function is a function who return a unique key for each words. In fact you have to find a function who's balance between the number of hash table entry and the list's length.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•