[MAX] = {1, 10, 15, 5, 8, 7};
58n = (
link)malloc(
sizeof(
node));
84std::cout <<
"data["<< index <<
"]:";
86 while(pointer != NULL) {
88std::cout <<
"data["<< pointer->
key<<
"]:";
92pointer = pointer->
next;
101 int key= 0, index, i, counter;
105 while(index < MAX) {
110 for(i = 0; i <
HASHMAX; i++) {
111std::cout <<
"hashtab ["<< i <<
"]\n";
116std::cout <<
"please int key:";
118std::cout <<
"["<< p->
key<<
"]";
121std::cout << std::endl;
129std::cout <<
"search time = "<< counter << std::endl;
131std::cout <<
"no found!\n";
int hash_search(int key, int *counter)
#define HASHMAX
Determines the length of the hash table.
void create_list(int key)
struct list * link
pointer to nodes
node hashtab[HASHMAX]
array of nodes
struct list * next
pointer to next link in the chain
int key
key value for node
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4