---
title: "Discussion on \"DSA Practice Question - 2 \"Contains Duplicate\"\" | Hashnode"
description: "Discussion on \"DSA Practice Question - 2 \"Contains Duplicate\"\". Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.\nExample 1:\nInput: nums = [1,2,3,1]\nOutput: true\n\nExample 2:\nInput: nums = [1,2,3,4]\nOutput: false\n\nSolution\n\nI u..."
url: "https://hashnode.com/posts/dsa-practice-question-2-contains-duplicate/6425af7eb62b797ce8ae0910"
---

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

Discussion

# [DSA Practice Question - 2 "Contains Duplicate"](https://nitinasthanablog.hashnode.dev/dsa-practice-question-2-contains-duplicate?utm_source=hashnode&utm_medium=feed)

Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1: Input: nums = \[1,2,3,1\] Output: true Example 2: Input: nums = \[1,2,3,4\] Output: false Solution I u...

Mar 30, 2023 · 1 min read · nitinasthanablog.hashnode.dev  
Read the article

-   [#practice](https://hashnode.com/tag/practice)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#java](https://hashnode.com/tag/java)
-   [#course](https://hashnode.com/tag/course)
-   [#streak](https://hashnode.com/tag/streak)

## Written by

[Nitin Asthana](https://hashnode.com/@NitinAsthana)

@NitinAsthana · Chennai, India

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

Software Developer @ BNP Paribas

Full Stack Developer, BNP Paribas. An MCA graduate from Vellore Institute of Technology(V.I.T). I am a certified JAVA developer. Command over Quantum Computing and Quantum Transfer learning.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
