-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhash.c
50 lines (39 loc) · 940 Bytes
/
hash.c
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "hash.h"
// These are stubs. That is, you need to implement these functions.
int InsertFailCollision( void * hashtable, int elementSize, int elementCountMax,
int key, void * element, int (*HashFunc)(int key))
{
return 0;
}
void * SearchNoCollision(void * hashtable, int key, int elementSize, int (*HashFunc)(int key))
{
return NULL;
}
int DivMethod(int key)
{
return 0;
}
int MultMethod(int key)
{
return 0;
}
void * AllocateChainTable(int elementCountMax)
{
return NULL;
}
void FreeChainTable(void * hashtable)
{
}
int InsertChain( void * hashtable, int elementSize, int elementCountMax,
int key, void * element, int (*HashFunc)(int key))
{
return 0;
}
void * SearchChain(void * hashtable, int key, int elementSize, int (*HashFunc)(int key))
{
return NULL;
}