LeetCode
Two Sum III - Data structure design
Click
here
for an explanation.