Bloomberg Hash Table Questions

265 hash table problems asked at Bloomberg interviews

Easy (82)Medium (159)Hard (24)

Questions

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

Showing 265 questions