Contains Duplicate — Arrays & Hashing

Decide whether any integer in a list occurs at least twice, and report yes or no.

Arrays & Hashing · Easy

The problem

Given a list of integers, say whether any value shows up more than once.

What to return

Constraints

Example

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

Solve it

More in Arrays & Hashing

All algorithm problems