219.Contains Duplicate II:修订历史

差异选择:选中要对比的版本的单选按钮,按Enter键或下方的按钮。
说明:(当前)=与最后版本之间的差异,(之前)=与上一版本之间的差异,=小编辑。

2024年2月27日 (星期二)

  • 当前之前 14:362024年2月27日 (二) 14:36Riguz 讨论 贡献 1,911字节 +16 →‎HashSet
  • 当前之前 14:352024年2月27日 (二) 14:35Riguz 讨论 贡献 1,895字节 +1,895 创建页面,内容为“=Description= {{LeetCode |id=triangle |no=219 |difficulty=Medium |category=Array |collection=Top 150 |title=Contains Duplicate II |summary=Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k.}} Example 1: <syntaxhighlight lang="bash"> Input: nums = [1,2,3,1], k = 3 Output: true </syntaxhighlight> Example 2: <syntaxhighlight lang="bash"> Input: nums =…”