Hashing: Easy to Hard Problems
Easy
- Two Sum (Finds two numbers that add up to a target using hashing)
- Contains Duplicate (Checks if a list contains duplicates using hashing)
- Single Number (Finds the single number in an array where every other number appears twice)
- Intersection of Two Arrays (Finds common elements between two arrays)
- Happy Number (Uses hashing to detect cycles in a sequence)
Medium
- Group Anagrams (Groups anagrams together using hashing)
- Longest Consecutive Sequence (Finds the length of the longest consecutive sequence in an unsorted array)
- Find All Anagrams in a String (Finds all anagrams of a pattern in a text using hashing)
- Subarray Sum Equals K (Finds subarrays with a sum equal to a target using hashing)
- Contains Duplicate II (Checks if there are duplicates within a given range using hashing)
Hard
- Longest Substring Without Repeating Characters (Finds the longest substring with unique characters using hashing)
- Sliding Window Maximum (Finds the maximum value in a sliding window over an array)
- Design Twitter (Designs a Twitter-like system involving hashing for efficient access)
- Reconstruct Original Digits from English (Decodes a string to reconstruct original digits using hashing)
- Minimum Window Substring (Finds the smallest window in a string that contains all characters of another string using hashing)