Contains Duplicate Leetcode Problem 704