LeetCode
Contains Duplicate II
Click
here
for an explanation.