Contains Nearby Duplicate Leetcode