An open API service indexing awesome lists of open source software.

https://github.com/isebasus/hashmap

A very cool hashmap written in C
https://github.com/isebasus/hashmap

c funny hashmap

Last synced: 13 days ago
JSON representation

A very cool hashmap written in C

Awesome Lists containing this project

README

          

# 🗞️ hashmap

A silly, basic hashmap written in C.

# Documentation

The hashmap is created dynamically using `create_hashmap()` and freed using
`delete_hashmap()`.

```c
hashmap_t *create_hashmap(uint32_t size);

void delete_hashmap(hashmap_t **hm);
```

To insert unique elements, we can use `hashmap_insert()` and
to look up elements, we can use `hashmap_lookup`.

```c
void hashmap_insert(hashmap_t *hm, uint8_t *key, int value);

int hashmap_lookup(hashmap_t *hm, uint8_t *key);
```