---
title: "Discussion on \"220. Contains Duplicate III\" | Hashnode"
description: "Discussion on \"220. Contains Duplicate III\". Problem Link\nGiven an integer array nums and two integers k and t, return true if there are two distinct indices i and j in the array such that \n\nabs(nums[i] - nums[j]) <= t and \nabs(i - j) <= k.\n\nSolution\nBucket size: t + 1\nclass Solution:\n    def c..."
url: "https://hashnode.com/posts/220-contains-duplicate-iii/629f7a077c63506288937100"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [220\. Contains Duplicate III](https://superbcoder.hashnode.dev/220-contains-duplicate-iii?utm_source=hashnode&utm_medium=feed)

Problem Link Given an integer array nums and two integers k and t, return true if there are two distinct indices i and j in the array such that abs(nums\[i\] - nums\[j\]) <= t and abs(i - j) <= k. Solution Bucket size: t + 1 class Solution: def c...

Jun 7, 2022 · 1 min read · superbcoder.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#array](https://hashnode.com/tag/array)

## Written by

[Jim Chung](https://hashnode.com/@JimHYC)

@JimHYC

  
[View profile](https://hashnode.com/@JimHYC)

Leetcode

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
