Contains Duplicate III
Total Accepted: 26968 Total Submissions: 146059 Difficulty: Medium
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j is at most k.
思路
- 两层Loop O(kn) 超时 -