⚡️ Tryprepforge
Coding Round 1 Mid programming

**LeetCode #217 - Contains Duplicate**\nGiven an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. You are to implement an efficient solution that does not run into performance issues based on the size of the input.\n### Example 1: \n**Input:** nums = [1,2,3,1] \n**Output:** true \n**Explanation:** The number 1 appears twice.\n### Example 2: \n**Input:** nums = [1,2,3,4] \n**Output:** false \n**Explanation:** All elements are distinct.\n### Constraints: \n- 1 <= nums.length <= 10^5 \n- -10^9 <= nums[i] <= 10^9

Suggested Answer

Practice More Questions Like This

Generate unlimited interview questions with structured answers, code runner, and AI-powered walkthroughs.

No credit card required

More Coding Round 1 Interview Prep

Link copied to clipboard