Tap here to switch tabs
Problem
Submissions

Problem: Contains Duplicate

Contains Duplicate checks an integer array and returns true when any value appears more than once, or false when every value is unique. Values may be negative.

Statement

For a given array of integers, nums, return TRUE if it contains duplicates. Otherwise, return FALSE.

Constraints:

  • 1≤1 \leq nums.length ≤103\leq 10^3

  • −109≤-10^9 \leq nums[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Contains Duplicate

Contains Duplicate checks an integer array and returns true when any value appears more than once, or false when every value is unique. Values may be negative.

Statement

For a given array of integers, nums, return TRUE if it contains duplicates. Otherwise, return FALSE.

Constraints:

  • 1≤1 \leq nums.length ≤103\leq 10^3

  • −109≤-10^9 \leq nums[i] ≤109\leq 10^9