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″]

KodNest Training New Batch is starting on 19th October 2020. Attend one week free demo classes.Register Now

New Report

Close