start adding low level functionality to help with future development

This commit is contained in:
2024-05-07 16:33:30 +01:00
parent 635aa98a1a
commit 6173c18be6
13 changed files with 696 additions and 35 deletions

24
src/hashmap/hashmap.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef HASHMAP_H
#define HASHMAP_H
struct node
{
int key;
void *val;
struct node *next;
};
struct table
{
int size;
struct node **list;
};
struct table *createTable(int size);
int hashCode(struct table *t, int key);
int remove(struct table *t, int key);
void insert(struct table *t, int key, void* val);
#endif // HASHMAP_H