Leetcode 2021-04-17 🟡 220.contains-duplicate-iii#sort #ordered-map
Given an integer array
nums and two integers
k and
t, return
true if there are
two distinct indices i and
j in the array such that
abs(nums[i] - nums[j]) <= t and
abs(i - j) <= k.
Input: nums = [1,2,3,1], k = 3, t = 0
Output: true