Skip to content

Glossary: Data Structures and Algorithms in Java

hash function

Also written: hash, hashing

A function that turns any key into a whole number, which a HashMap uses to pick a bucket. Java's version is `hashCode()`.

Where the book teaches it

Related terms

hashCodebucketcollision