#217

Contains Duplicate

easy · 64.1% accepted · 13,828 likes · top 67%

array · hash table · sorting

⊣ practice⊣ quiz⊣ open on leetcode ↗

Description

Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.

Solution