Hash table creation and insertion
Hi,
I am working on implementation of a hash table.
In a given string I have to find the first word which is not repeated in the string.
Now as a hash function I am simply using atoi(str).
So for "total", I get following
t 116
o 111
t 116
a 97
l 108
I am able to do uptil this properly.
Now I want to create hash table and store this in hash table which will have 3 columns.
index........converted_int.........count
1................ 116...................... 2
2.................111.......................1
3.................97.........................1
4..................108......................1
So after this things are stored in hash table , then I can search the count values in the order of the characters in the original string and see which first character is not reapeated (seeing the count = 1)
I am almost able to do the conversion of given characters in string.
Can someone tell me how can I create hash table for this and insert these values in it? I am struggling a lot.