Back to problems

Keypad Letter Combination

Algorithm · Microsoft · Medium

This problem is a variation of a classic phone-keypad letter-combinations problem. If you have not solved that earlier problem, consider working through it first. You are given a string of digits (0–9), where each digit represents a key pressed on a mobile phone keypad. The letters available for each digit are: '1' maps to ['A', 'B', 'C'] '2' maps to ['D', 'E', 'F'] '3' maps to ['G', 'H', 'I'] '4' maps to ['J', 'K', 'L'] '5' maps to ['M', 'N', 'O'] '6' maps to ['P', 'Q',…

Checking your access…