avatar_url

Sandesh Rana | Python

I'm a developer from Himalayas, with a passion for crafting efficient and elegant code, with creativity and precision.

Hashing

21 Aug 2024 » programming, datastructure

Hashing: Easy to Hard Problems

Easy

  1. Two Sum (Finds two numbers that add up to a target using hashing)
  2. Contains Duplicate (Checks if a list contains duplicates using hashing)
  3. Single Number (Finds the single number in an array where every other number appears twice)
  4. Intersection of Two Arrays (Finds common elements between two arrays)
  5. Happy Number (Uses hashing to detect cycles in a sequence)

Medium

  1. Group Anagrams (Groups anagrams together using hashing)
  2. Longest Consecutive Sequence (Finds the length of the longest consecutive sequence in an unsorted array)
  3. Find All Anagrams in a String (Finds all anagrams of a pattern in a text using hashing)
  4. Subarray Sum Equals K (Finds subarrays with a sum equal to a target using hashing)
  5. Contains Duplicate II (Checks if there are duplicates within a given range using hashing)

Hard

  1. Longest Substring Without Repeating Characters (Finds the longest substring with unique characters using hashing)
  2. Sliding Window Maximum (Finds the maximum value in a sliding window over an array)
  3. Design Twitter (Designs a Twitter-like system involving hashing for efficient access)
  4. Reconstruct Original Digits from English (Decodes a string to reconstruct original digits using hashing)
  5. Minimum Window Substring (Finds the smallest window in a string that contains all characters of another string using hashing)