219. Contains Duplicates II
Given an array of integers and an integer
k, find out whether there are two distinct indicesiandjin the array such that nums[i] = nums[j] and the absolute difference betweeniandjis at mostk.
给一个数组, 看nums[i]附近的k个数里, 是否有相同的. 也就是说, 如果存在nums[i] == nums[j]和abs(j-i) <= k则返回True 否则返回 False.