Bloomberg Hash Table Questions

250 hash table problems asked at Bloomberg interviews

Easy (79)Medium (146)Hard (25)

Questions

TitleDifficulty
Two SumEasy
Longest Substring Without Repeating CharactersMedium
Insert Delete GetRandom O(1)Medium
Roman to IntegerEasy
Longest Consecutive SequenceMedium
LRU CacheMedium
Majority ElementEasy
Valid AnagramEasy
Subarray Sum Equals KMedium
Invalid TransactionsMedium
Design Underground SystemMedium
Group AnagramsMedium
Word BreakMedium
Word Break IIHard
Contains DuplicateEasy
First Unique Character in a StringEasy
Longest Repeating Character ReplacementMedium
Design an Ordered StreamEasy
Remove Letter To Equalize FrequencyEasy
Integer to RomanMedium
Letter Combinations of a Phone NumberMedium
Valid SudokuMedium
Sudoku SolverHard
First Missing PositiveHard
Set Matrix ZeroesMedium
Construct Binary Tree from Preorder and Inorder TraversalMedium
Word LadderHard
Copy List with Random PointerMedium
Linked List CycleEasy
Intersection of Two Linked ListsEasy
Happy NumberEasy
Isomorphic StringsEasy
Implement Trie (Prefix Tree)Medium
Contains Duplicate IIEasy
Missing NumberEasy
Top K Frequent ElementsMedium
Intersection of Two ArraysEasy
Next Greater Element IEasy
Top K Frequent WordsMedium
Vertical Order Traversal of a Binary TreeHard
Minimum Number of Steps to Make Two Strings AnagramMedium
Find Missing and Repeated ValuesEasy
Minimum Window SubstringHard
Word Ladder IIHard
Linked List Cycle IIMedium
Repeated DNA SequencesMedium
Majority Element IIMedium
Intersection of Two Arrays IIEasy
Ransom NoteEasy
Find the DifferenceEasy
Longest PalindromeEasy
Sort Characters By FrequencyMedium
Contiguous ArrayMedium
Permutation in StringMedium
Implement Magic DictionaryMedium
Binary Subarrays With SumMedium
Subarray Sums Divisible by KMedium
Find Common CharactersEasy
Unique Number of OccurrencesEasy
Number of Substrings Containing All Three CharactersMedium
Sort Array by Increasing FrequencyEasy
Check if All the Integers in a Range Are CoveredEasy
Find All Anagrams in a StringMedium
Maximum Sum of Distinct Subarrays With Length KMedium
Fruit Into BasketsMedium
Reordered Power of 2Medium
Substring with Concatenation of All WordsHard
Clone GraphMedium
Ugly Number IIMedium
Word PatternEasy
All O`one Data StructureHard
Minimum Genetic MutationMedium
Find All Duplicates in an ArrayMedium
Find All Numbers Disappeared in an ArrayEasy
Continuous Subarray SumMedium
Brick WallMedium
Task SchedulerMedium
Set MismatchEasy
Accounts MergeMedium
Partition LabelsMedium
Reorganize StringMedium
Hand of StraightsMedium
Relative Sort ArrayEasy
Count Number of Nice SubarraysMedium
Check If N and Its Double ExistEasy
Number of Good PairsEasy
Max Number of K-Sum PairsMedium
Check if the Sentence Is PangramEasy
Most Stones Removed with Same Row or ColumnMedium
Smallest Range Covering Elements from K ListsHard
How Many Numbers Are Smaller Than the Current NumberEasy
Longest Harmonious SubsequenceEasy
Rank Transform of an ArrayEasy
Insert Delete GetRandom O(1) - Duplicates allowedHard
Maximum Subarray Sum With Length Divisible by KMedium
Two Sum IV - Input is a BSTEasy
Check if All Characters Have Equal Number of OccurrencesEasy
Subarrays with K Different IntegersHard
Unique Length-3 Palindromic SubsequencesMedium
Tuple with Same ProductMedium
Max Sum of a Pair With Equal Sum of DigitsMedium
Letter Tile PossibilitiesMedium
Sum of Beauty of All SubstringsMedium
All Nodes Distance K in Binary TreeMedium
Rabbits in ForestMedium
Finding 3-Digit Even NumbersEasy
Number of Matching SubsequencesMedium
Jewels and StonesEasy
Find Winner on a Tic Tac Toe GameEasy
Next Greater Numerically Balanced NumberMedium
Longest Balanced Subarray IMedium
Bus RoutesHard
Construct Binary Tree from Inorder and Postorder TraversalMedium
Max Points on a LineHard
Design TwitterMedium
LFU CacheHard
Replace WordsMedium
Find Duplicate SubtreesMedium
Delete and EarnMedium
Custom Sort StringMedium
Design HashSetEasy
Unique Morse Code WordsEasy
Fair Candy SwapEasy
Time Based Key-Value StoreMedium
Find the Town JudgeEasy
Longest Arithmetic SubsequenceMedium
Longest String ChainMedium
Find Resultant Array After Removing AnagramsEasy
Group the People Given the Group Size They Belong ToMedium
Minimum Number of Operations to Make Array ContinuousHard
Minimum Consecutive Cards to Pick UpMedium
Amount of Time for Binary Tree to Be InfectedMedium
Find Common Elements Between Two ArraysEasy
Most Frequent Subtree SumMedium
Maximum Total Damage With Spell CastingMedium
Regions Cut By SlashesMedium
Most Frequent IDsMedium
Walking Robot SimulationMedium
Find the Longest Substring Containing Vowels in Even CountsMedium
Count Pairs That Form a Complete Day IIMedium
Make Sum Divisible by PMedium
Divide Players Into Teams of Equal SkillMedium
The Number of the Smallest Unoccupied ChairMedium
Split a String Into the Max Number of Unique SubstringsMedium
Minimum Index Sum of Two ListsEasy
Degree of an ArrayEasy
Flip Columns For Maximum Number of Equal RowsMedium
Open the LockMedium
Count Vowel Substrings of a StringEasy
Check if Array is GoodEasy
Find Score of an Array After Marking All ElementsMedium
Sliding Window MedianHard
Find Longest Special Substring That Occurs Thrice IMedium
Count Special SubsequencesMedium
Word SubsetsMedium
Construct K Palindrome StringsMedium
Minimum Length of String After OperationsMedium
Find the Prefix Common Array of Two ArraysMedium
Maximum Score Words Formed by LettersHard
First Completely Painted Row or ColumnMedium
Find Original Array From Doubled ArrayMedium
Find the Difference of Two ArraysEasy
Remove Zero Sum Consecutive Nodes from Linked ListMedium
Find the Number of Distinct Colors Among the BallsMedium
Sort the PeopleEasy
Longest Nice SubstringEasy
Find Unique Binary StringMedium
Distribute CandiesEasy
Construct Binary Tree from Preorder and Postorder TraversalMedium
Length of Longest Fibonacci SubsequenceMedium
Count of Substrings Containing Every Vowel and K Consonants IIMedium
Divide Array Into Equal PairsEasy
Find All Possible Recipes from Given SuppliesMedium
Lowest Common Ancestor of Deepest LeavesMedium
Minimum Number of Operations to Make Elements in Array DistinctEasy
Minimum Operations to Make Array Values Equal to KEasy
Equal Row and Column PairsMedium
Count Largest GroupEasy
Count of Interesting SubarraysMedium
Most Frequent Even ElementEasy
Merge Two 2D Arrays by Summing ValuesEasy
Number of Equivalent Domino PairsEasy
Longest Palindrome by Concatenating Two Letter WordsMedium
Find Maximum Number of Non Intersecting SubstringsMedium
Count the Number of Consistent StringsEasy
Minimum Moves to Clean the ClassroomMedium
Minimum Operations to Make the Array AlternatingMedium
Lexicographically Minimum String After Removing StarsMedium
Maximum Manhattan Distance After K ChangesMedium
Minimum Deletions to Make String K-SpecialMedium
Find Subsequence of Length K With the Largest SumEasy
Find Lucky Integer in an ArrayEasy
Finding Pairs With a Certain SumMedium
Maximum Erasure ValueMedium
Maximum Unique Subarray Sum After DeletionEasy
Maximum XOR of Two Numbers in an ArrayMedium
Sum of Unique ElementsEasy
Verifying an Alien DictionaryEasy
Smallest String With SwapsMedium
Rearranging FruitsHard
The Number of Beautiful SubsetsMedium
Merge BSTs to Create Single BSTHard
Longest Uncommon Subsequence IIMedium
Minimum Number of People to TeachMedium
Vowel SpellcheckerMedium
Design Task ManagerMedium
Count Elements With Maximum FrequencyEasy
Find Subarrays With Equal SumEasy
Fraction to Recurring DecimalMedium
Minimum Common ValueEasy
Maximum Palindromes After OperationsMedium
Make Two Arrays Equal by Reversing SubarraysEasy
Avoid Flood in The CityMedium
Count Number of Bad PairsMedium
Rank Teams by VotesMedium
Longest Balanced Substring IMedium
Simple Bank SystemMedium
Largest Positive Integer That Exists With Its NegativeEasy
Maximum Frequency StackHard
Delete Nodes From Linked List Present in ArrayMedium
Find X-Sum of All K-Long Subarrays IEasy
Find X-Sum of All K-Long Subarrays IIHard
Minimum Operations to Convert All Elements to ZeroMedium
Longest Substring with At Least K Repeating CharactersMedium
Delete Duplicate Folders in SystemHard
Determine if Two Strings Are CloseMedium
Keep Multiplying Found Values by TwoEasy
Smallest Integer Divisible by KMedium
Count Special TripletsMedium
Cinema Seat AllocationMedium
Count Number of Trapezoids IMedium
Design SpreadsheetMedium
Circular Array LoopMedium
Number of Good PathsHard
Meeting Rooms IIIHard
Magic Squares In GridMedium
Online ElectionMedium
Smallest Subtree with all the Deepest NodesMedium
Find the Length of the Longest Common PrefixMedium
Maximum Square Area by Removing Fences From a FieldMedium
Find Missing ElementsEasy
N-Repeated Element in Size 2N ArrayEasy
Take K of Each Character From Left and RightMedium
Minimum Pair Removal to Sort Array IEasy
K-diff Pairs in an ArrayMedium
Minimize String LengthEasy
Find Words That Can Be Formed by CharactersEasy
Find And Replace in StringMedium
Linked List ComponentsMedium
Longest Balanced Substring IIMedium

Showing 250 questions