arrow_back Back to Challenges

#217 Contains Duplicate

Easy Acceptance 0%
description

Problem Description

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.

checklist Constraints

1 <= nums.length <= 10^5
-10^9 <= nums[i] <= 10^9

science Examples

Case #1

In: nums = [1,2,3,1]
Out: true

Case #2

In: nums = [1,2,3,4]
Out: false

Mastery Tags

Arrays Hash Table Sorting

Hiring Companies

Adobe Amazon Apple
code

Integrated IDE

code_blocks
Coding
psychology
Aptitude