---
title: "Discussion on \"Leetcode problem number- 219\" | Hashnode"
description: "Discussion on \"Leetcode problem number- 219\". Contains Duplicate II   \nProblem description: 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.\n\nInput: nums = [1,2,3,1], k = 3\nOutput: t..."
url: "https://hashnode.com/posts/leetcode-problem-number-219/61d85f368d56921d07b90f62"
---

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

Discussion

# [Leetcode problem number- 219](https://ash56sciencefreaks.hashnode.dev/leetcode-problem-number-219?utm_source=hashnode&utm_medium=feed)

Contains Duplicate II Problem description: 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. Input: nums = \[1,2,3,1\], k = 3 Output: t...

Jan 7, 2022 · 2 min read · ash56sciencefreaks.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#womenwhocode](https://hashnode.com/tag/womenwhocode)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#computer-science](https://hashnode.com/tag/computer-science)

## Written by

[Ashi garg](https://hashnode.com/@Ash56)

@Ash56

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

## Responses 1

Markdown supported · ⌘↵ to post

[himani prasad](https://hashnode.com/@Himani016)

[Jan 7, 2022](https://hashnode.com/posts/leetcode-problem-number-219/61d85f368d56921d07b90f62/comment/61d8616c4b84101d2c3ee5a9)

It was easy to understand. Thanks aashi!
