r/C_Programming • u/Significant_Ant9861 • Aug 08 '26
Hash table
I am newbie and a beginner in c language. I would like to learn the hash table for my next semester.
I kindly ask for some help in this matter. I still struggle in the basics even using the ai models.
7
Upvotes
View all comments
Show parent comment
1
u/flatfinger Aug 10 '26
Efficiency depends what the code needs to do. If one is designing something like a language implementation that needs to be able to add things to the current scope and then revert to an outer scope, such a chain-bucket approach makes it easy to have identifiers that are added later take priority over those added earlier. Managing priority with open hashing seems much more difficult, unless there's some trick I'm unaware of.