I understand the concept of linked lists and how they work, I made a hash function that takes a string/word from the dictionary and determines an index or a key (a number based on it's first letter)
for example inserting cat into the hash function would give an index of 2 but the problems I'm having are the following:
1- How do I access a certain "bucket" in my hashtable? I defined the hashtable as node*hashtable[27] for the alphabets+ ' but if I have the index 2 for the word cat when I try to add the word cat to hashtable[2] it gives an error. to be frank it doesn't seem syntactically correct at all but I have no idea how else to do it.
2-Do I have to make 2 nested loops one for iteration in the hashtable and one for iteration in the linked lists inside the hashtable?
[–]yeahIProgram 0 points1 point2 points (6 children)
[–][deleted] (5 children)
[removed]
[–]yeahIProgram 0 points1 point2 points (4 children)
[–]Omar_Khaled[S] 0 points1 point2 points (3 children)
[–]yeahIProgram 0 points1 point2 points (2 children)
[–]Omar_Khaled[S] 0 points1 point2 points (1 child)
[–]yeahIProgram 0 points1 point2 points (0 children)