-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHashTable.h
More file actions
28 lines (24 loc) · 772 Bytes
/
HashTable.h
File metadata and controls
28 lines (24 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
*Batch Number 6
*Abhinav Bhatia (2011A7PS371P)
*Mukul Bhutani (2011A7PS343P)
*/
#ifndef _HASHTABLE_H_
#define _HASHTABLE_H_
#include "linklist.h"
typedef struct
{
int size;
int hashTableSize;
LinkList* table;
int(*hashFunction) (void* value, int hashTableSize);
int(*comparator) (void* value1, void* value2);
} HashTable;
HashTable hashTable_createNew(int hashTableSize, int(*comparator) (void*, void*), int(*hashFunction) (void* value, int hashTableSize));
int hashTable_find(HashTable ht, void* value);
//int symbolTable_find(HashTable ht, Symbol s);
HashTable hashTable_remove(HashTable ht, void* value);
HashTable hashTable_add(HashTable ht, void* value);
HashTable hashTable_clear(HashTable ht);
void* hashTable_getElement(HashTable ht, void* key);
#endif