initial commit
This commit is contained in:
commit
563b1b0c5a
7 changed files with 335 additions and 0 deletions
16
sortedmap.h
Normal file
16
sortedmap.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue