Contains Duplicate

Easy

📝 Description

Check if array contains duplicate elements

Input Format

Array of integers

Output Format

true/false

Constraints

1 ≤ nums.length ≤ 10^5

🔍 Sample Input

[1,2,3,1]
            

✅ Sample Output

true
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run