Algorithm · Netflix · Easy
Contains Duplicate Coding — Software Engineer Given an integer array nums, determine whether at least one value occurs multiple times. Return true when any value is present more than once; if every value appears only once, return false. Examples Example 1: Input: nums = [1, 2, 3, 3] Output: true The value 3 occurs twice, so the result is true. Example 2: Input: nums = [1, 2, 3, 4] Output: false Every value occurs once, so the result is false.
Checking your access…