Amazon String Coding Interview Questions
191 string coding problems are tagged as asked at Amazon in interviews and online assessments reported by candidates. By difficulty they split into 64 basic, 94 intermediate and 33 advanced. The topics they most often combine with are Math, Hash Table, Stack, Two Pointers.
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
- Valid Parentheses (Basic)
- Longest Substring Without Repeats (Intermediate)
- Reverse String (Basic)
- First Unique Character (Basic)
- Valid Palindrome (Basic)
- Decode Ways (Intermediate)
- Longest Palindromic Substring (Intermediate)
- Valid Anagram (Basic)
- Ransom Note (Basic)
- Repeated Substring Pattern (Intermediate)
- Reverse Words in a String (Basic)
- Reverse Vowels of a String (Basic)
- Roman to Integer (Intermediate)
- Excel Column Number (Basic)
- Add Binary (Basic)
- Length of Last Word (Basic)
- Longest Common Subsequence (Advanced)
- Edit Distance (Advanced)
- Longest Valid Parentheses (Advanced)
- Score of Parentheses (Intermediate)
- Greatest Common Divisor of Strings (Intermediate)
- Partition Labels (Intermediate)
- Sort Characters by Frequency (Intermediate)
- Remove Outer Parentheses (Basic)
- Shortest Distance to a Character (Intermediate)
- Maximum Number of Balloons (Basic)
- Remove Invalid Parentheses (Intermediate)
- Valid Parenthesis With Wildcards (Advanced)
- Is Subsequence (Basic)
- Minimum Time to Make Rope Colorful (Intermediate)
- Minimum Deletions for Unique Frequencies (Intermediate)
- Permutation Inside a String (Intermediate)
- Zigzag Conversion (Intermediate)
- Remove K Digits to Get the Smallest Number (Intermediate)
- Compare Version Numbers (Intermediate)
- Count Palindromic Substrings (Intermediate)
- Longest Substring With At Most K Letters (Intermediate)
- Longest Palindromic Subsequence (Intermediate)
- Isomorphic Strings (Basic)
- Minimum Window Substring (Advanced)
- Shortest Palindrome (Advanced)
- Rotate String (Basic)
- Length of Last Word (Basic)
- Add Strings (Basic)
- Reconstruct Itinerary (Advanced)
- Text Justification (Intermediate)
- Palindrome Linked List (Basic)
- Zigzag Level Order Traversal (Intermediate)
- Level Order Traversal (Basic)
- Smallest String Starting From Leaf (Intermediate)
- Find Leaves of Binary Tree (Intermediate)
- Open the Lock (Intermediate)
- Minimum Genetic Mutation (Intermediate)
- Satisfiability of Equality Equations (Intermediate)
- Regions Cut by Slashes (Intermediate)
- Similar String Groups (Advanced)
- Alien Dictionary Order (Advanced)
- Largest Color Value in a Directed Graph (Advanced)
- Interleaving String (Intermediate)
- Regular Expression Matching (Advanced)
- Ones and Zeroes (Intermediate)
- Scramble String (Advanced)
- Longest String Chain (Intermediate)
- Strange Printer (Advanced)
- Two Keys Keyboard (Intermediate)
- Count Number of Texts (Intermediate)
- Count Ways to Build Good Strings (Intermediate)
- Number of Ways to Select Buildings (Intermediate)
- Extra Characters in a String (Intermediate)
- Find First Occurrence (Basic)
- Longest Happy Prefix (Intermediate)
- Repeated String Match (Intermediate)
- Longest Duplicate Substring (Advanced)
- Sum of Scores of Built Strings (Advanced)
- String Compression (Basic)
- Valid Number (Advanced)
- String to Integer (Intermediate)
- Multiply Strings (Intermediate)
- Integer to English Words (Advanced)
- Longest Word in Dictionary (Intermediate)
Related
- Amazon coding interview questions
- String 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.