GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

Ask a Question

 

Start Coding Today

   

GeeksQuiz

GeeksforGeeksIDE

Data Structures

Algorithms

Interview Experiences

C Programming

C++ Programming

Java Programming

GATE CS

Books

String result from old school telephone

Using old school telephone to write string (2 - {ABC}, 3 - {DEF}, ... etc)

1- Write an algorithm to generate all possible strings result from input number.

example:

Input: 2, 2, 8

output: {AAT, ABT, ACT, CAT, ACT, BAT, .... etc)

2- return only english words not gebrish 

example: result only be (CAT, ACT, BAT ... etc)

3- improve the performance

asked Oct 9, 2016 by waelouf
...