A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://TheAlgorithms.github.io/C-Plus-Plus/d1/df3/hash__search_8cpp_source.html below:

TheAlgorithms/C++: search/hash_search.cpp Source File

Go to the documentation of this file. 24int data

[MAX] = {1, 10, 15, 5, 8, 7};

58

n = (

link

)malloc(

sizeof

(

node

));

84

std::cout <<

"data["

<< index <<

"]:"

;

86 while

(pointer != NULL) {

88

std::cout <<

"data["

<< pointer->

key

<<

"]:"

;

92

pointer = pointer->

next

;

101 int key

= 0, index, i, counter;

105 while

(index < MAX) {

110 for

(i = 0; i <

HASHMAX

; i++) {

111

std::cout <<

"hashtab ["

<< i <<

"]\n"

;

116

std::cout <<

"please int key:"

;

118

std::cout <<

"["

<< p->

key

<<

"]"

;

121

std::cout << std::endl;

129

std::cout <<

"search time = "

<< counter << std::endl;

131

std::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