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 fast search
Use Hash Map
Hash key to index
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 access.
