Search⌘ K
AI Features

Contains Duplicate

Explore how to detect duplicate integers in an array efficiently. This lesson helps you understand the problem constraints and implement a solution that runs in linear time and uses linear space, preparing you to handle similar coding interview questions confidently.

Statement

For a given array of integers, nums, return TRUE if it contains duplicates. Otherwise, return FALSE.

Constraints:

  • 11 \leq nums.length ...