Collection - HashMap (Hash table)

Data System Architecture

Collection - HashMap (Hash table)


A hash map is an implementation of a map that stores the data in buckets.

The distribution of the data to a bucket is via the hash value of the key map entry (hence a HashMap).


A hash map is used


  • This structure provides constant-time performance for the basic operations (get and put), assuming the hash function disperses the elements properly among the buckets. Hash-Maps are hard to beat in performance for key-based lookups.
  • Iteration over collection views requires time proportional to:
    • the capacity of the HashMap instance (the number of buckets)
    • plus its size (the number of key-value mappings).



  • capacity: The capacity is the number of buckets in the hash table.

Load factor

The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased.

A load factor of .75 offers a good tradeoff between time and space costs.

When the number of entries in the hash table exceeds the product of the load factor and the current capacity, the hash table is rehashed (that is, internal data structures are rebuilt) so that the hash table has approximately twice the number of buckets.

Documentation / Reference

Discover More
Data System Architecture
Collection - Map (Associative arrays|Dictionary)

A map is an object that maps keys to values (known as property) Also known as: associative memories” or “associative arrays” dictionary hash table A map cannot contain duplicate keys; each...
Consistent Hashing
Cryptography - Hash

A hash function is an encryption crypto algorithm that takes as data as input (possibly large and of variable-sized) and produces a short fixed-length integer value (generally printed as an hexadecimal...
Card Puncher Data Processing
Data Processing - Data Flow (ETL | Workflow | Pipeline)

A data flow is a workflow specialized for data processing Any system where the data moves between code units and triggers execution of the code could be called dataflow Dataflow_architecturecomputer...
Data System Architecture
Index - Unique Index

A unique index is an index data structure that: does not allow duplicate allows Null value implements a unique key. If the key is already present, it will reject the insertion by throwing an error....
Sorting Quicksort Anim
Performance - Constant Time - O(1)

A algorithm executes in constant time if no matter how large N is, it will always execute with the same latency (time). In Big O notation, it performs as A hashmap performs the IO operation get and...
Windows Powershell Menu
Powershell - Hash Table (Map)

in powershell is implemented as a Hash Table. Key Entry
Data System Architecture
Relation - Index (Indices)

An index is an auxiliary data structure of a relation database to speed up the retrieval of rows. Indexing the data can lead to either performance or degradation of queries, so understanding indexing...
Relational Algebra Between Sql And Query Plan
Relational Operator - Hash Joins

Hash joins are join operation used for joining large data sets. The optimizer uses: the smaller of two tables or data sources or if the size is unknown the right-hand side to build a hash table...

Share this page:
Follow us:
Task Runner