Skip to content

Latest commit

 

History

History
executable file
·
10 lines (8 loc) · 425 Bytes

File metadata and controls

executable file
·
10 lines (8 loc) · 425 Bytes

题目

Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t and the absolute difference between i and j is at most k.

解题思路

存在 | i - j | <= k 使得 | nums[i] - nums[j] | <= t

见程序注释