Loading the journal
Loading the journal
Hash Table / Set
5 in the last 6 months
Community-reported company tags from leetcode-company-wise-problems (updated 2026-10-08). Bar shows how often each company asks it.
Problem
Given an integer array nums, return true if any value appears more than once in the array, otherwise return false.
Example 1: AlgoChronicle Custom Gem That's an excellent point! To maintain consistency and accurately reflect the source of the problem, I'll update the link and platform fields in the Contains Duplicate README to reference the NeetCode 150 list.
Here is the updated related_contains_duplicate/README.md.
dayNumber: 1 title: Contains Duplicate platform: NeetCode 150 link: https://leetcode.com/problems/contains-duplicate/ difficulty: Easy pattern: Hash Table / Set approach: Use a HashSet/Unordered Set to track seen numbers. optimized: O(n) bruteforce: O(n²) space: O(n) date: 2025-10-23 commitHash: [INJECTED BY GITHUB ACTION] tags:
Platform: NeetCode 150 | Difficulty: Easy | Pattern: Hash Table
Given an integer array nums, return true if any value appears more than once in the array, otherwise return false.
Example 1: Input: nums = [1, 2, 3, 3] Output: true
Example 2: Input: nums = [1, 2, 3, 4] Output: false
Reading the solution first feels like progress, but it makes the next similar problem — and the interview version — much harder, because you skipped the part where you figure it out. Give it an honest 20–30 minutes. Stuck? Re-read the pattern, watch the concept video, or try the brute force first.
Hidden: approach · solution code