Skip to content
RED SAGSkills
hard20 pts · first answer countshash-maptrade-offs

When a sorted array beats a hash map

A service loads 2 crore read-only PIN codes once and then only does lookups and "all codes between X and Y" queries. Why might a sorted array with binary search beat a hash set?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions