MCPcopy Create free account
hub / github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA / Insert

Method Insert

08. Hashing/HashingArrayProblem.cpp:29–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 return k % T_S;
28 }
29 void Insert(int k, int v) {
30 int h = HashFunc(k);
31 while (t[h] != NULL && t[h]->k != k) {
32 h = HashFunc(h + 1);
33 }
34 if (t[h] != NULL)
35 delete t[h];
36 t[h] = new HashTableEntry(k, v);
37 }
38 int SearchKey(int k) {
39 int h = HashFunc(k);
40 while (t[h] != NULL && t[h]->k != k) {

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected