I'm implementing a hashtable structure for a dictionary. Dictionary is in a text file. There are 2 words on each line. I'm generating the hashtable by using the first word as a key. I'm holding the hashtable on a list. I want to save the hashtable to a text file to use it every time. What kind of structure should I use? Is there a way to do this without reading the whole hashtable from text file?
Writing-Reading a hashtable to a text file
programming practices;data structures;hashing;serialization
You are looking for serialization. In Python you could use pickle. In Java you can do it too. Almost every language has techniques for serialization.If your hashtable becomes too big, you will have to use a relational database management sysyem, like MySQL, PostgreSQL, Oracle, SQL Server, etc.