The standard 12-key telephone keypad looks like the following:
To write text using the keypad you have to press the number keys. For example, to write X
press the key 9 twice. Given a sequence of numbers, return all possible combinations of words formed from mobile keypad which have some digits associated with each key.
When the solution is called with arr = [2, 3, 4]
the expectected list of permutations is the following:
ADG BDG CDG AEG BEG CEG AFG BFG CFG ADH BDH CDH AEH BEH CEH AFH BFH CFH ADI BDI CDI AEI BEI CEI AFI BFI CFI
Examples: