TikTok Hash Table Questions

76 hash table problems asked at TikTok interviews

Easy (7)Medium (52)Hard (17)

Questions

TitleDifficulty
LRU CacheMedium
Longest Substring Without Repeating CharactersMedium
Number of Distinct IslandsMedium
Minimum Window SubstringHard
Subarray Sum Equals KMedium
Top K Frequent ElementsMedium
Longest Consecutive SequenceMedium
Snapshot ArrayMedium
Two SumEasy
Word LadderHard
Design HashMapEasy
Insert Delete GetRandom O(1)Medium
Meeting Rooms IIIHard
Construct Binary Tree from Preorder and Inorder TraversalMedium
Minimum Operations to Make Character Frequencies EqualHard
Word Break IIHard
Count Complete Subarrays in an ArrayMedium
Most Popular Video CreatorMedium
Bus RoutesHard
Group AnagramsMedium
Longest Substring with At Least K Repeating CharactersMedium
Word BreakMedium
Subarray Sums Divisible by KMedium
Design In-Memory File SystemHard
Find the Length of the Longest Common PrefixMedium
Reorganize StringMedium
Minimize Malware SpreadHard
Open the LockMedium
Find All Duplicates in an ArrayMedium
Minimum Operations to Write the Letter Y on a GridMedium
Intersection of Two Linked ListsEasy
Find All Possible Recipes from Given SuppliesMedium
Design Tic-Tac-ToeMedium
Insert Delete GetRandom O(1) - Duplicates allowedHard
Stickers to Spell WordHard
Regions Cut By SlashesMedium
Design Memory AllocatorMedium
Integer to RomanMedium
Longest Substring with At Most K Distinct CharactersMedium
Fruit Into BasketsMedium
Find All Anagrams in a StringMedium
Number of Islands IIHard
LFU CacheHard
Pairs of Songs With Total Durations Divisible by 60Medium
Longest Substring with At Most Two Distinct CharactersMedium
Count Pairs Of Similar StringsEasy
Permutation in StringMedium
Replace WordsMedium
Time Based Key-Value StoreMedium
All Nodes Distance K in Binary TreeMedium
Delete and EarnMedium
Add Bold Tag in StringMedium
Roman to IntegerEasy
Number of AtomsHard
Contiguous ArrayMedium
Count Number of Nice SubarraysMedium
Task SchedulerMedium
Accounts MergeMedium
All O`one Data StructureHard
Rearrange String k Distance ApartHard
Copy List with Random PointerMedium
Top K Frequent WordsMedium
Dot Product of Two Sparse VectorsMedium
Rearranging FruitsHard
Valid SudokuMedium
Sparse Matrix MultiplicationMedium
Range Frequency QueriesMedium
Count the Number of Good SubarraysMedium
Subarrays with K Different IntegersHard
Happy NumberEasy
Implement Trie (Prefix Tree)Medium
Next Greater Element IEasy
Maximum Size Subarray Sum Equals kMedium
Word Pattern IIMedium
Construct Binary Tree from Inorder and Postorder TraversalMedium
Lowest Common Ancestor of a Binary Tree IVMedium

Showing 76 questions