DSA question set · 180 questions
Hash Table DSA Practice Questions
Explore 180 DSA questions in Hash Table. Practice with DSAWiser’s code editor and visualizer.
Hash TableMathArraysGeometryStringsSortingSliding WindowDynamic ProgrammingPrefix SumMatrixGraphDesignTreeUnion FindTrie
What’s in this set
The Hash Table collection contains 180 problems: 50 basic, 50 easy, 35 medium, 25 hard, 20 very hard. Choose a question at your current level, or follow the collection’s order below.
Topics in this collection include Hash Table, Math, Arrays, Geometry, Strings. Each question shows its own topics and difficulty so you can decide where to begin.
Practice with the code visualizer
- Open a question in the editor and read the statement, inputs, and expected output. Predict the result for a small example before writing code.
- Write a solution and run the examples. If a result differs from your prediction, reduce the input until you can follow each step.
- Step through your code in the visualizer. Use a breakpoint to inspect the state at a specific line, then compare it with your reasoning.
Questions in this set
180 totalOpen a question in the editor to read its statement and examples. Sign in to practice.
- Compute Hash Index (Division Method)Hash Table · MathBasic
- Direct Address Table PresenceHash Table · ArraysBasic
- Chaining Bucket IdentificationHash Table · Arrays · MathBasic
- Linear Probing Next Empty SlotHash Table · GeometryBasic
- Key-Value Pair LookupHash TableBasic
- String Hash by Character SumHash Table · StringsBasic
- Count Collisions in Table BucketsHash Table · Arrays · MathBasic
- Hash Set Size (Unique Element Count)Hash Table · ArraysBasic
- Single Character Frequency LookupHash Table · StringsBasic
- Check Key Existence (Contains Key)Hash Table · ArraysBasic
- Hash Table Load FactorHash Table · MathBasic
- Maximum Character FrequencyHash Table · StringsBasic
- Separate Chaining Bucket SizeHash Table · Arrays · MathBasic
- Quadratic Probing Next Empty SlotHash TableBasic
- Check for Duplicate ElementsHash Table · ArraysBasic
- First Repeating ElementHash Table · ArraysBasic
- Count Unique Characters in StringHash Table · StringsBasic
- Maximum Bucket Length (Longest Chain)Hash Table · Arrays · MathBasic
- Double Hashing Probe PositionsHash Table · MathBasic
- Frequency of an Integer QueryHash Table · ArraysBasic
- Count Empty BucketsHash Table · Arrays · MathBasic
- First Non-Repeating CharacterHash Table · StringsBasic
- Count Elements in A Not in BHash Table · ArraysBasic
- Multiplication Hash MethodHash Table · MathBasic
- Check Disjoint SetsHash Table · ArraysBasic
- Hash Set Intersection SizeHash Table · ArraysBasic
- Hash Set Union SizeHash Table · ArraysBasic
- Hash Table Rehashing SimulationHash Table · Arrays · MathBasic
- Count Elements with Given FrequencyHash Table · ArraysBasic
- Linear Probing Search Probe CountHash Table · Geometry · MathBasic
- Map Insert or OverwriteHash TableBasic
- Count Elements Appearing More Than OnceHash Table · ArraysBasic
- Sum of Unique ElementsHash Table · ArraysBasic
- Minimum Character FrequencyHash Table · StringsBasic
- Slot Status in Open Addressing (Tombstones)Hash TableBasic
- Check Subset RelationHash Table · ArraysBasic
- Flat Index Hash for 2D GridHash TableBasic
- Unique Character Frequencies CheckHash Table · StringsBasic
- Most Frequent Integer (Smallest on Tie)Hash Table · Arrays · SortingBasic
- Simulate Hash Set OperationsHash TableBasic
- Multiset Overlap CountHash Table · ArraysBasic
- Symmetric Pair Hash (XOR Modulo)Hash TableBasic
- Count Elements with Odd FrequenciesHash Table · ArraysBasic
- Hash Table Bucket Occupancy PercentageHash Table · Arrays · MathBasic
- Character Frequency Equality (Anagram Check)Hash TableBasic
- First Repeating CharacterHash Table · StringsBasic
- Keys with Values Exceeding ThresholdHash TableBasic
- Check Permutation of 1 to NHash Table · ArraysBasic
- Maximum Cluster Size in Open AddressingHash TableBasic
- Missing Number in Range 0 to NHash Table · ArraysBasic
- Two Sum (Target Pair Existence)Hash Table · ArraysEasy
- Jewels and StonesHash TableEasy
- Ransom Note ConstructionHash TableEasy
- Isomorphic StringsHash Table · StringsEasy
- Intersection of Two Arrays (Unique Elements)Hash Table · ArraysEasy
- Word PatternHash Table · StringsEasy
- Happy Number (Cycle Detection via Set)Hash TableEasy
- Index of First Unique CharacterHash Table · StringsEasy
- Majority Element (Frequency > N/2)Hash Table · ArraysEasy
- Contains Duplicate II (Within Window Distance K)Hash Table · Arrays · Sliding WindowEasy
- Longest Palindrome Length from CharactersHash Table · Strings · Dynamic ProgrammingEasy
- Find All DuplicatesHash Table · ArraysEasy
- Distribute CandiesHash Table · ArraysEasy
- Divide Array into Equal PairsHash Table · ArraysEasy
- Words on a Single Keyboard RowHash Table · StringsEasy
- Smallest Subarray with Same DegreeHash Table · Arrays · Prefix SumEasy
- Set Mismatch (Duplicate and Missing Number)Hash Table · ArraysEasy
- Common Characters Across All StringsHash Table · StringsEasy
- Sort Array by FrequencyHash Table · Arrays · SortingEasy
- Subarray with Zero Sum ExistenceHash Table · Arrays · Prefix SumEasy
- Total Length of Words Formable by CharactersHash Table · StringsEasy
- Count Pairs with Absolute Difference KHash Table · ArraysEasy
- Custom Sort String by Specified OrderHash Table · Strings · SortingEasy
- Number of Good Pairs (Equal Values)Hash Table · ArraysEasy
- Check PangramHash Table · StringsEasy
- K-th Distinct String in an ArrayHash Table · StringsEasy
- Intersection of Multiple ArraysHash Table · ArraysEasy
- Unique Number of OccurrencesHash Table · ArraysEasy
- Missing and Repeated Values in GridHash Table · MatrixEasy
- Destination CityHash TableEasy
- Find the Added CharacterHash Table · StringsEasy
- Most Frequent Even ElementHash Table · Arrays · SortingEasy
- Buddy Strings (Single Swap Equality)Hash Table · StringsEasy
- Maximum Pairs Formed and LeftoversHash Table · ArraysEasy
- Minimum Steps to Make Two Strings AnagramsHash Table · StringsEasy
- All Characters Minimum Frequency KHash Table · StringsEasy
- Target Pair Across Two ArraysHash Table · ArraysEasy
- Subarray with Given Sum ExistenceHash Table · Arrays · Prefix SumEasy
- Missing Numbers in Range [L, R]Hash Table · ArraysEasy
- Palindrome PermutationHash Table · Strings · Dynamic ProgrammingEasy
- Uncommon Words from Two SentencesHash Table · StringsEasy
- Array Pairs Divisible by KHash Table · ArraysEasy
- Tic-Tac-Toe Line TrackerHash Table · GeometryEasy
- Relative Sort ArrayHash Table · Arrays · SortingEasy
- Path Crossing DetectionHash Table · StringsEasy
- Divide Array into Sets of K Consecutive NumbersHash Table · ArraysEasy
- Find the Town JudgeHash Table · GraphEasy
- Check Valid Matrix Rows and ColumnsHash Table · MatrixEasy
- Roman Numeral to IntegerHash Table · StringsEasy
- Longest Harmonious SubsequenceHash Table · ArraysEasy
- Group AnagramsHash Table · StringsMedium
- Subarray Sum Equals KHash Table · Arrays · Prefix SumMedium
- Longest Consecutive SequenceHash Table · ArraysMedium
- Contiguous Array with Equal 0s and 1sHash Table · ArraysMedium
- 4Sum II (Count Tuples with Zero Sum)Hash Table · ArraysMedium
- Top K Frequent ElementsHash Table · Arrays · SortingMedium
- Subarray Sums Divisible by KHash Table · Arrays · Prefix SumMedium
- Group Shifted StringsHash Table · StringsMedium
- Find All Anagram Start IndicesHash Table · Strings · Sliding WindowMedium
- O(1) Collection with Swap-to-Last DeletionHash TableMedium
- Brick Wall (Least Crossed Bricks)Hash TableMedium
- Longest Subarray with Sum KHash Table · Arrays · Prefix SumMedium
- Continuous Subarray Sum Multiple of KHash Table · Arrays · Prefix SumMedium
- Pairs of Songs Divisible by 60Hash TableMedium
- Count Number of Bad PairsHash Table · ArraysMedium
- Subdomain Visit CountHash TableMedium
- Fraction to Recurring DecimalHash TableMedium
- Minimum Area of Axis-Aligned RectangleHash Table · GeometryMedium
- Maximum Points on a LineHash Table · GeometryMedium
- Time-Based Key-Value StoreHash TableMedium
- Least Recently Used (LRU) Cache SimulationHash Table · DesignMedium
- Longest Substring Without Repeating CharactersHash Table · Strings · Sliding WindowMedium
- Line Reflection of 2D PointsHash Table · GeometryMedium
- Number of BoomerangsHash Table · GeometryMedium
- Repeated DNA SequencesHash Table · StringsMedium
- Top K Frequent WordsHash Table · Strings · SortingMedium
- Recover Original Array from Doubled ArrayHash Table · ArraysMedium
- Authentication Manager (Token Expiry Tracker)Hash TableMedium
- Subarray Sum Divisible by Array LengthHash Table · Arrays · Prefix SumMedium
- Longest Subarray with Equal Evens and OddsHash Table · Arrays · Prefix SumMedium
- Group Duplicate Files by ContentHash TableMedium
- Minimum Deletions for Unique Character FrequenciesHash Table · StringsMedium
- All Binary Codes of Size K ExistenceHash Table · StringsMedium
- Longest Substring with At Most K Distinct CharactersHash Table · Strings · Sliding WindowMedium
- Longest Well-Performing IntervalHash TableMedium
- Least Frequently Used (LFU) CacheHash Table · Sorting · DesignHard
- Substring with Concatenation of All WordsHash Table · Strings · Sliding WindowHard
- Number of Submatrices That Sum to TargetHash Table · MatrixHard
- Frequency Bucket Map with Lexicographic ExtremesHash Table · Sorting · MathHard
- Minimum Area of Arbitrary / Rotated RectangleHash Table · GeometryHard
- O(1) Collection with Duplicates (Randomized Collection)Hash TableHard
- Longest Duplicate SubstringHash Table · Strings · Sliding WindowHard
- Distinct Echo SubstringsHash Table · Strings · Sliding WindowHard
- Count Subarrays with Median KHash Table · Arrays · Prefix Sum · Dynamic ProgrammingHard
- Longest Substring with Even Counts of All VowelsHash Table · Strings · Sliding WindowHard
- Subarrays with Exactly K Different IntegersHash Table · Arrays · Prefix SumHard
- Shortest Palindrome by Prepending CharactersHash Table · Strings · Dynamic ProgrammingHard
- Palindrome PairsHash Table · Strings · Dynamic ProgrammingHard
- Maximum Collinear Points with DuplicatesHash Table · GeometryHard
- Shortest Word Transformation Sequence CountHash Table · GraphHard
- Minimum Window SubstringHash Table · Strings · Sliding WindowHard
- Maximum Sum Rectangle No Larger Than KHash Table · Matrix · GeometryHard
- Longest Chunked Palindrome DecompositionHash Table · Strings · Dynamic ProgrammingHard
- Split Array with Equal Average (Meet-in-the-Middle)Hash Table · ArraysHard
- Total Count of Distinct SubstringsHash Table · Strings · Sliding WindowHard
- Maximum Frequency Stack (FreqStack)Hash Table · DesignHard
- Naming a Company (Distinct Prefix-Suffix Grouping)Hash Table · Strings · Prefix SumHard
- Word Pattern II (Bijection with Substrings)Hash Table · Strings · Sliding WindowHard
- Longest Common Subpath Across Multiple PathsHash TableHard
- Substrings Differing by Exactly One CharacterHash Table · Strings · Sliding WindowHard
- FKS Two-Level Perfect Hashing SimulationHash Table · Arrays · MathVery hard
- Cuckoo Hashing Simulation with Cycle DetectionHash Table · Arrays · MathVery hard
- 2D Matrix Pattern Matching via 2D Rolling HashHash Table · Strings · MatrixVery hard
- Subarray Multiset Equality via Zobrist HashingHash Table · Arrays · Prefix Sum · MathVery hard
- Tree Isomorphism via Merkle Subtree HashingHash Table · Graph · Tree · MathVery hard
- Count Subarrays with Even Frequencies (Exact Parity States)Hash Table · Arrays · Prefix Sum · Dynamic ProgrammingVery hard
- Longest Repeating Non-Overlapping SubstringHash Table · Strings · Sliding WindowVery hard
- Subtree Isomorphism CountingHash Table · Graph · TreeVery hard
- Alien Dictionary with Complete Cycle & Prefix VerificationHash Table · Strings · Prefix Sum · GraphVery hard
- Robin Hood Hashing with Backward Shift DeletionHash Table · MathVery hard
- Three-Palindrome Partitioning via Rolling HashHash Table · Strings · Dynamic ProgrammingVery hard
- Subarrays with Sum Divisible by Their Own LengthHash Table · Arrays · Prefix SumVery hard
- De Bruijn Sequence GenerationHash Table · GraphVery hard
- Path Sum on a Tree via Prefix Sum BacktrackingHash Table · Prefix Sum · Graph · TreeVery hard
- Substring Matching with At Most K MismatchesHash Table · Strings · Sliding WindowVery hard
- Maximum Prefix with Removable Element for Equal FrequenciesHash Table · Arrays · Prefix SumVery hard
- Count Good Paths in a Tree via Component Value MapsHash Table · Graph · Tree · Union FindVery hard
- Count Subarrays with XOR Less Than KHash Table · Arrays · Prefix Sum · TrieVery hard
- Distinct Subsequences of a String Modulo 10^9 + 7Hash Table · Strings · Dynamic ProgrammingVery hard
- Longest Palindromic Substring LengthHash Table · Strings · Sliding WindowVery hard