Skip to content

Files

Latest commit

7a7d3f2 · Oct 20, 2020

History

History

0220.Contains Duplicate III

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 20, 2020
Oct 20, 2020
Mar 17, 2020
Aug 20, 2020

English Version

题目描述

给定一个整数数组,判断数组中是否有两个不同的索引 ij,使得 nums [i] 和 nums [j] 的差的绝对值最大为 t,并且 ij 之间的差的绝对值最大为 ķ

示例 1:

输入: nums = [1,2,3,1], k = 3, t = 0
输出: true

示例 2:

输入: nums = [1,0,1,1], k = 1, t = 2
输出: true

示例 3:

输入: nums = [1,5,9,1,5,9], k = 2, t = 3
输出: false

解法

Python3

Java

...