MCPcopy
hub / github.com/qiyuangong/leetcode / get

Method get

java/706_Design_HashMap.java:14–20  ·  view source on GitHub ↗
(int key)

Source from the content-addressed store, hash-verified

12 }
13
14 public int get(int key) {
15 int i = idx(key);
16 if (nodes[i] == null)
17 return -1;
18 ListNode node = find(nodes[i], key);
19 return node.next == null ? -1 : node.next.val;
20 }
21
22 public void remove(int key) {
23 int i = idx(key);

Callers 15

minIncrementForUniqueMethod · 0.45
subarraySumMethod · 0.45
cmp_alienMethod · 0.45
topKFrequentMethod · 0.45
letterCasePermutationMethod · 0.45
twoSumMethod · 0.45
repeatedNTimesMethod · 0.45
fibMethod · 0.45
mostCommonWordMethod · 0.45
findShortestSubArrayMethod · 0.45
pushMethod · 0.45
popMethod · 0.45

Calls 2

idxMethod · 0.95
findMethod · 0.95

Tested by

no test coverage detected