Reading-Notes
My journal for Code Fellows
Project maintained by RogerMReyes
Hosted on GitHub Pages — Theme by mattgraham
Read 30
Summary
- Hash Tables utilize key value pairs to store information
- The key is hashed then divided by an array length which gives the index to store the value
- A collision is when a value is being set at an index that already has already been set
- Ways to account for this would be setting the index as either a linked list, array, or tree
- If no specific entry at value then the default value is null
- larger bucket sizes and multiplying by a prime number help even distribution and avoid collisions
Things I want to know more About
It would be interesting to see how a HashTable or HashMap is used in a real situation.
Return to Code 401 Table of Contents