Soal
00:00

4. Contains Duplicate

MudahTabel hashAmazonMicrosoft

Determine whether the integer array nums contains any duplicate values.

Contoh 1:

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

Contoh 2:

Input: nums = [1,2,3,4]
Output: false

Batasan:

  • 1 <= nums.length <= 10^5
Mode kode inti
● Tersimpan otomatisBaris 1, kolom 1