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

Method get

Hashtable/design-hashmap.cpp:19–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 }
18
19 int get(int key) {
20 int index = key%100;
21 for(int i=0 ; i<bucket[index].size(); i++){
22 if(bucket[index][i].first==key)
23 return bucket[index][i].second;
24 }
25 return -1;
26 }
27
28 void remove(int key) {
29 int index = key%100;

Callers 12

buildFailureLinksMethod · 0.45
searchMethod · 0.45
lengthOfLISMethod · 0.45
ceilMethod · 0.45
intersectionMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
recurMethod · 0.45
recurMethod · 0.45
checkForCycleMethod · 0.45
checkCycleMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected