MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

Hashtable/cuckoo-hashing.cpp:117–139  ·  view source on GitHub ↗

driver function */

Source from the content-addressed store, hash-verified

115
116/* driver function */
117int main()
118{
119 /* following array doesn't have any cycles and
120 hence all keys will be inserted without any
121 rehashing */
122 int keys_1[] = {20, 50, 53, 75, 100, 67, 105,
123 3, 36, 39};
124
125 int n = sizeof(keys_1)/sizeof(int);
126
127 cuckoo(keys_1, n);
128
129 /* following array has a cycle and hence we will
130 have to rehash to position every key */
131 int keys_2[] = {20, 50, 53, 75, 100, 67, 105,
132 3, 36, 39, 6};
133
134 int m = sizeof(keys_2)/sizeof(int);
135
136 cuckoo(keys_2, m);
137
138 return 0;
139}

Callers

nothing calls this directly

Calls 1

cuckooFunction · 0.85

Tested by

no test coverage detected