Concept Flow - Why Hash Map Exists and What Problem It Solves
Start: Need to store key-value pairs
Use simple list or array?
No
Search slow: O(n) time
Need faster search
Use Hash Map: Compute hash(key)
Map hash to index in array
Store value at index
Retrieve value fast by key
Problem solved: Fast lookup, insert, delete
Shows the flow from needing to store key-value pairs to using a hash map for fast lookup by computing a hash and mapping it to an array index.
