25 lines
492 B
C
25 lines
492 B
C
#ifndef HASTABLE_H
|
|
#define HASTABLE_H
|
|
|
|
typedef struct {
|
|
char* Key;
|
|
char* Value;
|
|
} BucketKeyPair;
|
|
|
|
typedef struct {
|
|
unsigned int Size;
|
|
unsigned int Capacity;
|
|
BucketKeyPair** KeyPairs;
|
|
} Bucket;
|
|
|
|
typedef struct {
|
|
unsigned int Capacity;
|
|
Bucket** Values;
|
|
} HashTable;
|
|
|
|
HashTable* CreateHashTable(void);
|
|
void AddItemToHashTable(char* key, char* item, HashTable* table);
|
|
char* GetHashTableItem(char* key, HashTable* table);
|
|
void PrintHashTable(HashTable* table);
|
|
|
|
#endif |