Hashing in Data Structure Last Updated : 10 Sep, 2025 Comments Improve Suggest changes 39 Likes Like Report Hashing is a technique used in data structures that efficiently stores and retrieves data in a way that allows for quick access. Hashing involves mapping data to a specific index in a hash table (an array of items) using a hash function. It enables fast retrieval of information based on its key. The great thing about hashing is, we can achieve all three operations (search, insert and delete) in O(1) time on average.Hashing is mainly used to implement a set of distinct items (only keys) and dictionaries (key value pairs).Hashing in Data StructureBasics IntroductionApplications Separate Chaining for Collision HandlingOpen Addressing for Collision HandlingEasy ProblemsCheck tor SubsetCheck for DisjointCheck for Equal Fizz BuzzMax distance between two occurrencesDuplicate within K DistanceIntersection of Two ArraysUnion of Two ArraysMost Frequent Element 2 Sum - Find if there is any pair2 Sum - Count PairsCount Pairs with Given DiffOnly repetitive element from 1 to n-1Missing of a Range Missing from Min to Max of ArrayMinimum Subsets with distinctMinimum Removals for No Common Maximum points on the same line Medium ProblemsPair Sums Divisible by kSubarray with sum divisible by k3 Sum - Count all triplets with Given sum3 Sum – Find All Triplets with Zero SumItinerary from a given list of ticketsLongest Subarray with Majority Greater Than KNumber of Employees Under every EmployeeLargest subarray with 0 sumSubarray with given sum Longest Consecutive subsequence Largest Fibonacci SubsetConsecutive Subset PartitioningDistincts in every window of size kInsert, delete, search and getRandom Min insertions for a palindrome permutation Smallest subarray with k distinct numbersAll pairs (a, b) in an array such that a % b = kGroup words with same set of charactersk-th distinct (or non-repeating) . Hard ProblemsRepresent Fraction as String4 Sum – Count quadruplets 4 Sum – Find all Quadruplets4 Sum - From four sorted arraysLargest subarray with equal 0s and 1sLongest Common Sum Span Palindrome Substring QueriesSubarrays having distinct count Maximum array from two arraysSum of all unique sub-array sums.Recaman’s sequenceLongest strict bitonic subsequenceDuplicate Subtrees Submatrix with corners as 1Quick Links :‘Practice Problems’ on HashingTop Hashing Interview Questions‘Quizzes’ on Hashing Learn Data Structure and Algorithms | DSA Tutorial Create Quiz Introduction to Hashing Visit Course Introduction to Hashing Hashing Application Comment H harendrakumar123 Follow 39 Improve H harendrakumar123 Follow 39 Improve Article Tags : Hash DSA Like