initial commit

This commit is contained in:
Felix Van der Jeugt 2022-11-01 22:09:32 +01:00
commit 563b1b0c5a
No known key found for this signature in database
GPG key ID: 58B209295023754D
7 changed files with 335 additions and 0 deletions

16
sortedmap.h Normal file
View file

@ -0,0 +1,16 @@
#ifndef SORTED_MAP
#define SORTED_MAP
enum nodetype { LEAF, INTERN };
typedef struct node {
enum nodetype type;
char * key;
} SortedMap;
SortedMap * map();
void * get_map(SortedMap *this, char *key);
SortedMap * put_map(SortedMap *this, char *key, void *value);
void print_map(SortedMap *this);
void free_mapvalues(SortedMap *this);
void free_map(SortedMap *this);
#endif