CodeOath
← All problems

Contains Duplicate

Easy
arrayshash-table

Return true if any value appears at least twice in the array.

Example:

Input: nums = [1,2,3,1]
Output: true