def containsNearByDuplicate(self, nums, k):
        od = OrderedDict()
        for n in nums:
            if od.get(n):
                return True

            while len(od) >= k:
                od.popitem(False)

            od[n] = n

        return False
dataset/ETHPy150Open algorhythms/LeetCode/220 Contains Duplicate III.py/Solution.containsNearByDuplicate/original