July 2018
Beginner
202 pages
5h 4m
English
For hash tables, a hash function maps a specific key's space into a smaller number range. More formally, a hash function, f, maps keys of a specific data type to integers in a fixed interval [0,..., N - 1]. We say f(x) hashes the value of x.
The hash function can accept only numeric data types. To allow us to use hash tables on more complex data types, we usually need to convert all these types into numeric representations. This translation varies, depending on the type of data. For example, a character can be changed into its UTF-8 (or ASCII) numeric equivalent. Converting a full string can be done by converting each character separately and then using a strategy to combine the characters into ...
Read now
Unlock full access