Amazon Hash Table Coding Interview Questions
90 hash table coding problems are tagged as asked at Amazon in interviews and online assessments reported by candidates. By difficulty they split into 30 basic, 42 intermediate and 18 advanced. The topics they most often combine with are Array, String, Tree, Sorting.
Reported questions change over time and are not a guarantee of what you will be asked, so use the list to see which patterns Amazon 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)
- 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)
- Loud and Rich (Intermediate)
- Combination Sum IV (Intermediate)
- Knight Dialer (Intermediate)
- Longest String Chain (Intermediate)
- Extra Characters in a String (Intermediate)
- Longest Duplicate Substring (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)
- Maximum Number of Removable Characters (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)
- 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)
- Largest Triangle Area (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)
- Cut Off Trees for Golf Event (Advanced)
- Restore Array From Adjacent Pairs (Intermediate)
- Unique Length-3 Palindromic Subsequences (Intermediate)
- Allocate Mailboxes (Advanced)
- Minimum Total Distance Traveled (Advanced)
- Most Common Word (Basic)
- Unique Morse Code Words (Basic)
- Jewels and Stones (Basic)
- String Matching in an Array (Basic)
- Duplicate Zeros (Basic)
- Lucky Numbers in a Matrix (Basic)
Related
- Amazon coding interview questions
- Hash Table problems
- Amazon basic problems
- Amazon intermediate problems
- Amazon advanced problems
- Company interview roadmaps
- All interview guides
Frequently asked questions
How should I use the Amazon 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 Amazon 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.