Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Letter Combinations of a Phone Number (Medium 17)

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.

Solution:

Click here Create recursive function that takes digits, current string, result and mapping of numbers to characters arrays. Each recursion call add to current string new letter and call more recursively. O(4^n * n) time, O(4^n * n) space.



Installation

Run make to run python and Swift files.