Contains Duplicate III
CodingPhone, OnsiteSoftware EngineerReported Mar, 2026Medium Frequency
Examples
Example 1:
Input: nums = [1,2,3,1], indexDiff = 3, valueDiff = 0
Output: true
Explanation:
Example 2:
Input: nums = [1,5,9,1,5,9], indexDiff = 2, valueDiff = 3
Output: false
Explanation: