I am confused about the hash function. This is a good hash function
private int hash(K key) {
return (key.hashCode() & 0x7fffffff) % M;
}
How would I turn that into a very bad hash function, would it be like this?
private int hash(K key) {
return (key.hashCode() & 17) % M;
}
User contributions licensed under CC BY-SA 3.0