Question 1

Given a string as input, return the list of all the patterns possible:

‘1’ : [ ‘A’, ‘B’, ‘C’ ],

‘2’ : [ ‘D’, ‘E’ ],

’12’: [ ‘X’ ],

‘3’ : [ ‘P’, ‘Q’ ]

Example if input is ‘123’, then output should be [ADP, ADQ, AEP, AEQ, BDP, BDQ, BEP, BEQ, CDP, CDQ, CEP, CEQ, XP, XQ]

[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]

×