Concept Flow - Why Hash Map Exists and What Problem It Solves
Start: Need to store key-value pairs
Use simple list or array?
Yes
Search by key: Slow linear scan
Problem: Slow lookup
Use Hash Map
Hash key to index
Store value at index
Fast lookup by key
Problem solved: Quick access to values
Shows the flow from needing to store key-value pairs, facing slow search in simple lists, to using a hash map for fast lookup by hashing keys.
