Skip to content

Latest commit

 

History

History
139 lines (80 loc) · 5.69 KB

hash_tables.md

File metadata and controls

139 lines (80 loc) · 5.69 KB

Hash tables and hashing

Table of contents


Introduction and overview

🔗

Hash functions

A hash function is a function that maps data of arbitrary size to fixed-size values. A good hash function satisfies two basic properties: it should be very fast to compute and it should minimize duplication of output values (collisions). Hashing in the C++ standard library is implemented via std::hash<T> function object type.

🔗

🎥

Fowler–Noll–Vo hash function

The FNV hashing algorithm is used in the std::hash implementation in the Microsoft standard library.

Cryptographic hash functions

See Hashing – Cryptographic algorithms.

Custom hash functions

🔗

Combining hash values

Hash tables

A hash table is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found. Hash tables in the C++ standard library go by the names of std::unordered_[multi]set and std::unordered_[multi]map. See Unordered containers – The standard library.

🔗

🎥

Bloom filter

Bloom filter is a space-efficient probabilistic data structure that is used to test whether an element is a member of a set. False positive matches are possible, but false negatives are not.

🔗

🎥

📄

📖

💫

Extendible hashing

Extendible hashing is a type of hash system that treats a hash as a bit string and uses a trie for bucket lookup.

🔗

Consistent hashing

🔗

Implementations