Microsoft Interview Question: Print all all possible string... | Glassdoor

Find your next job here

Interview Question

Senior Software Development Engineer Interview Redmond, WA

Print all all possible string combinations from entering a

  variable number of cell phone keys.

Interview Answer

1 Answer


I believe this is a permutations question, fix one letter and permute over the other combinations and return along the way if an invalid path is encountered. at the end check if word is valid, if yes then print it out.
you will use a Trie structure to hold the dictionary and check paths etc.

supernova on Jul 13, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.