Question catalog › Coding exercise › Amazon
Given a string of digits from 2 to 9 and the classic phone keypad mapping, return all possible letter combinations the number could represent.
- Coding exercise
- Amazon
- Medium
- 20 min
Sign in to view the question description. Premium company questions require an active Premium plan.
How to approach this coding exercise
Clarify the inputs and expected output, explain an approach, and check edge cases. Discuss correctness and complexity before implementing. Use coding practice when your target role requires it.
Practice this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.
Return to the question catalog · PM interview preparation guide
Practice guidance published by PMMockr Editorial. Company names are descriptive and do not imply affiliation.
Related coding exercises
- Given a factory represented as a 2D grid with some cells blocked and some containing robots, determine if the robots can collectively reach all unblocked cells.Amazon · Coding exercise · Easy
- Given a list of items with different sizes, write an algorithm to pack these items into the minimum number of batches without exceeding the capacity of each batch.Amazon · Coding exercise · Easy
- Implement k-means clustering.Amazon · Coding exercise · Medium
- Binary Tree Zigzag Level Order TraversalAmazon · Coding exercise · Medium
- Print the top view of nodes in a binary tree.Amazon · Coding exercise · Medium