@@ -0,0 +1,388 @@
+class Solution(object):%0A    def containsNearbyDuplicate(self, nums, k):%0A        %22%22%22%0A        :type nums: List%5Bint%5D%0A        :type k: int%0A        :rtype: bool%0A        %22%22%22%0A        numIndex = %7B%7D%0A        for i in range(len(nums)):%0A            index = numIndex.get(nums%5Bi%5D, -k - 1)%0A            if i - index %3C= k:%0A                return True%0A            numIndex%5Bnums%5Bi%5D%5D = i%0A        return False

add contains-duplicate-ii