Exercises/#3 Contains Duplicate
#3

Contains Duplicate

EasyπŸ“¦ Arrays
40 XP

Problem

Given an integer array nums, return true if any value appears at least twice, and false if every element is distinct.

Examples

Input: nums = [1,2,3,1]
Output: true

Input: nums = [1,2,3,4]
Output: false
hash-setarray
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

3 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features