terminal
Elevo
/
ESC
Login
Initiate Registration
code
Topics
corporate_fare
Companies
history
History
arrow_back
Back to Challenges
#217
Contains Duplicate
Easy
Acceptance 0%
Editorial
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
Python 3
expand_more
C
C++ 17
Java
JavaScript
Python 3
C
C++ 17
Java
JavaScript
Python 3
refresh
class Solution: def containsDuplicate(self, nums: list[int]) -> bool: pass
Login to Compile
Processing
terminal
Debug Output
home
Home
extension
Practice
robot_2
login
Sign In
account_circle
Menu
code_blocks
Coding
psychology
Aptitude
Navigation
close
Login
Registration