Google Hash Table Coding Interview Questions
97 hash table coding problems are tagged as asked at Google in interviews and online assessments reported by candidates. By difficulty they split into 32 basic, 44 intermediate and 21 advanced. The topics they most often combine with are Array, String, Sorting, Tree.
Reported questions change over time and are not a guarantee of what you will be asked, so use the list to see which patterns Google tends to test. For each problem, practise explaining your approach, its time and space cost and the edge cases before you write the code; every problem opens in an editor that runs your code against test cases.
Coding problems
- Contains Duplicate (Basic)
- Climbing Stairs (Basic)
- First Unique Character (Basic)
- Kth Largest Element (Intermediate)
- Missing Number (Basic)
- Intersection of Two Arrays (Basic)
- Valid Anagram (Basic)
- Third Maximum Number (Basic)
- Search in a Rotated Sorted Array (Advanced)
- Minimum in a Rotated Sorted Array (Intermediate)
- Sort Characters by Frequency (Intermediate)
- Kth Missing Positive Number (Basic)
- Minimum Deletions for Unique Frequencies (Intermediate)
- Unique Number of Occurrences (Basic)
- Count Unique Binary Search Trees (Basic)
- Count Numbers With Unique Digits (Intermediate)
- Tree Nodes at Distance K (Advanced)
- Coin Change Ways (Intermediate)
- BST Range Sum (Basic)
- Count Distinct Islands Shapes (Basic)
- Find Duplicate Subtrees (Basic)
- Maximum Path Quality (Basic)
- Kth Smallest Value in a BST (Intermediate)
- Lowest Common Ancestor of Two Values (Intermediate)
- Linked List Components (Intermediate)
- Tree From Inorder and Postorder (Intermediate)
- Minimum Absolute Difference in BST (Basic)
- Delete Node in a BST (Intermediate)
- Cousins in Binary Tree (Basic)
- Flip Equivalent Binary Trees (Intermediate)
- Binary Tree Coloring Game (Intermediate)
- Similar String Groups (Advanced)
- Alien Dictionary Order (Advanced)
- Combination Sum IV (Intermediate)
- Knight Dialer (Intermediate)
- Longest String Chain (Intermediate)
- Extra Characters in a String (Intermediate)
- Longest Duplicate Substring (Advanced)
- Distinct Echo Substrings (Advanced)
- Longest Word in Dictionary (Intermediate)
- Word Search II Count (Advanced)
- Custom Sort String (Basic)
- Minimum Steps to Make Two Strings Anagram (Basic)
- Remove Duplicate Letters (Advanced)
- Validate Stack Sequences (Intermediate)
- Number of Visible People in a Queue (Advanced)
- IPO (Advanced)
- Super Ugly Number (Intermediate)
- Least Unique Integers After K Removals (Intermediate)
- Find All Duplicates in an Array (Intermediate)
- Relative Sort Array (Basic)
- 3Sum Triplets (Intermediate)
- Kth Smallest in a Sorted Matrix (Intermediate)
- Kth Smallest Number in Multiplication Table (Advanced)
- Search in Rotated Sorted Array II (Intermediate)
- Combination Sum (Intermediate)
- Combination Sum II (Intermediate)
- Word Break II (Advanced)
- Max Length of Concatenated Unique Characters (Intermediate)
- Unique Paths III (Advanced)
- Design HashMap (Basic)
- Detect Squares (Intermediate)
- Max Points on a Line (Advanced)
- Count Number of Teams (Intermediate)
- Find the Difference of Two Arrays (Basic)
- Number of Boomerangs (Intermediate)
- Largest Triangle Area (Basic)
- Minimum Area Rectangle (Intermediate)
- Count the Number of Consistent Strings (Basic)
- Second Largest Digit in a String (Basic)
- Convert BST to Greater Tree (Intermediate)
- Balance a Binary Search Tree (Intermediate)
- Create Binary Tree From Descriptions (Intermediate)
- Min Cost to Connect All Points (Intermediate)
- Minimum Path Cost in a Grid (Intermediate)
- Restore Array From Adjacent Pairs (Intermediate)
- Bricks Falling When Hit (Advanced)
- Unique Length-3 Palindromic Subsequences (Intermediate)
- Allocate Mailboxes (Advanced)
- Minimum Total Distance Traveled (Advanced)
Related
- Google coding interview questions
- Hash Table problems
- Google basic problems
- Google intermediate problems
- Google advanced problems
- Company interview roadmaps
- All interview guides
Frequently asked questions
How should I use the Google problem list?
Start with the basic problems, then the intermediate and advanced ones, and note which topics repeat. Solve each under a timer, then read the explanation.
Are these the exact Google interview questions?
They are problems candidates reported being asked. Companies rotate questions, so use them to learn the patterns, not to predict the exact question.