Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Hashmap-C

A generic hashmap implementation done in C17 from scratch

Info:

  • Storing Key(char *) and value(int)
  • Custom hashing of the keys and dynamic resizing of the hashmap
  • hashmap.c contains all the code and functions for the Hashmap

Functions:

  • struct HASHMAP *createHashmap() | Creates a hashmap and gives the pointer to it
  • void putInHashmap(char *k, int v, struct HASHMAP **hashmap) | Takes key, value and the pointer to the variable of hashmap, and puts the value in it
  • int getKeyValue(char *key, int *targetvar, struct HASHMAP *hashmap) | Returns 1 if found , 0 if not found ; puts the value found in the target var
  • void freeHashmap(struct HASHMAP *hashmap) | Frees the hasmap from memory
  • void removeKey(char *key, struct HASHMAP *hashmap) | Removes a key from the hash map

About

A generic hashmap made with C

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages