Contains Duplicate
Given an array of integers, determine if it contains any duplicate values. Return true if at least one value appears more than once, false otherwise.
Input
nums: an array of integers
Output
A boolean - true if the array contains duplicates, false otherwise
Examples
Example 1:
Input: nums = [1, 2, 3, 4]
Output: false
Explanation: All elements are unique.
Example 2:
Input: nums = [1, 2, 3, 1]
Output: true
Explanation: The value 1 appears twice.
Example 3:
Input: nums = [5, 5, 5]
Output: true
Explanation: The value 5 appears three times.