Hash table size?

Soldato
Joined
15 Feb 2009
Posts
4,304
Location
Bristol
For my coursework at uni I have to read from a text file and put the words into both a linked list (can do this fine) and hash table, so that I can compare the efficiency of each storing method.

I've read and understand how the hash table works, but confused as to how big to make the table?

I understand that the bigger the table size, the less collisions but how big relative to the volume of input?

The text file I have to use has over 28,000 words, but making the table with 28,000+ indexes seems ridiculous? Or is having the same number of indexes as input normal?

I've tried googling but didn't get any answers.

All help is appreciated! :)
 
Back
Top Bottom