← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Practice/Google/Leetcode 217. Contains Duplicate
CodingOptional
Given an array of integers, determine whether any value appears more than once in the array. Return true if at least one number occurs multiple times, and return false if every element is unique.
Example 1:
Input: nums = [1, 2, 3, 1] Output: true Explanation: The number 1 appears at index 0 and index 3, so we return true.
Example 2:
Input: nums = [1, 2, 3, 4] Output: false Explanation: All elements are distinct, so we return false.
Example 3:
Input: nums = [1, 1, 1, 3, 3, 4, 3, 2, 4, 2] Output: true Explanation: Multiple elements appear more than once in the array.