Contains Duplicate Leetcode Solution