How to count all possible string that can be formed from a given sequence of digits(from 2-9) where each digit represents a mobile button and is mapped to 3/4 alphabet. eg:- 2 is mapped to A,B,C, by pressing the button 2 three times "222", possible strings that can be formed are {"AAA","AB","BA","C"}.
input= "2233", possible strings={"AADD","AAE","BDD","BE"}.
I need a pseudo-code to implement the above problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…