MCPcopy
hub / github.com/careercup/ctci / hashCodeOfKey

Method hashCodeOfKey

java/Chapter 8/Question8_10/Hash.java:13–15  ·  view source on GitHub ↗
(K key)

Source from the content-addressed store, hash-verified

11 }
12
13 public int hashCodeOfKey(K key) {
14 return key.toString().length() % items.length;
15 }
16
17 public void put(K key, V value) {
18 int x = hashCodeOfKey(key);

Callers 2

putMethod · 0.95
getMethod · 0.95

Calls 2

lengthMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected