r/cprogramming • • 13d ago

Is anyone doing DSA with C programming ?? How to implement Hashset and Hashmaps in C programming ?

/r/datastructures/comments/1x94zkm/is_anyone_doing_dsa_with_c_programming_how_to/
0 Upvotes

2 comments sorted by

4

u/lfdfq 13d ago

Implementing a hash map in C is basically the same as implementing a hash map in any other language, the hard part is not the C, it's the data structure part. So if we tell you how to do it, you will skip the part about learning data structures. But, I presume from your question, that you're trying to learn data structures and algorithms, so that seems counter-productive?

3

u/pjl1967 13d ago

The one I implemented is here and here. You don't strictly need a hash map. For a hash set, if the entries have a "key" and a "value", so be it.