Hashing in Data Structure Last Updated : 10 Sep, 2025 Comments Improve Suggest changes Like Article 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 Introduction to Hashing Visit Course Introduction to Hashing Hashing Application Comment More info H harendrakumar123 Follow Improve Article Tags : Hash DSA Explore DSA FundamentalsLogic Building Problems 2 min read Analysis of Algorithms 1 min read Data StructuresArray Data Structure 3 min read String in Data Structure 2 min read Hashing in Data Structure 2 min read Linked List Data Structure 2 min read Stack Data Structure 2 min read Queue Data Structure 2 min read Tree Data Structure 2 min read Graph Data Structure 3 min read Trie Data Structure 15+ min read AlgorithmsSearching Algorithms 2 min read Sorting Algorithms 3 min read Introduction to Recursion 14 min read Greedy Algorithms 3 min read Graph Algorithms 3 min read Dynamic Programming or DP 3 min read Bitwise Algorithms 4 min read AdvancedSegment Tree 2 min read Binary Indexed Tree or Fenwick Tree 15 min read Square Root (Sqrt) Decomposition Algorithm 15+ min read Binary Lifting 15+ min read Geometry 2 min read Interview PreparationInterview Corner 3 min read GfG160 3 min read Practice ProblemGeeksforGeeks Practice - Leading Online Coding Platform 6 min read Problem of The Day - Develop the Habit of Coding 5 min read Like