Video
A video that accompanies this page is
here...
.
It's time to take our best shot at a concept design. It will be a
deliverable
for the next phase (coding design).
HashTable Object Diagram
Here is our concept design.
We have added the maxLoadRatio as a sub-component
HashTable | +------- buckets ------- an Array | +------- maxLoadRatio -- an integer
📋
Bucket
Each bucket in the "buckets" collection is itself also a collection/list with the properties shown.
Bucket properties:
A bucket is a collection/list
Buckets will be
very small
(typically holding only one or two elements)
We must be able to efficiently add and remove from buckets (at any position)
Indexed access is
not
important
Bucket Elements
The elements in each bucket are
Association
objects.
Each Association holds a key and value.
Remember that elements are added to a hash table using the method
"put(key, value)"
.
Data Structures And Algorithms (DSA) (Chapter 601 - Hash Table Concepts)
Chapter 601 - Hash Table Concepts
< Prev
Concept Design Docs (Deliverables) 💡
Next >
Index
Intro
Concept Design 1
Algorithms
Concept Design 2
Advantages
References
Chapter
Top
Search Site
Contents