Tech_Interview_Prep

Arrays & Hashing

Contiguous storage, O(1) average-case lookups via hash maps, and the frequency-counting patterns they enable.

Q1.What is the average-case time complexity of a hash map lookup?

Q2.In the classic "two sum" problem, what does storing seen values in a hash map let you avoid?

Q3.What causes hash map performance to degrade toward O(n) in the worst case?

Q4.What technique groups anagrams together efficiently using a hash map?