How can i approach this problem?

how can i think this problem approach?

Hey @Vipin_coder
Let’s understand the question first.
Consider two examples:

  1. Let’s Start with 1023;

[1,2,3] =ABC
[1,23]=AW
[10,2,3]=JBC
[10,23]=JW
2. Now, coming to the next example 1432

[1,4,3,2]=ADCB
[14,3,2]=NCB
Approach :

  • Bigger Problem : To Print all of the possible mapped String of given number.
  • Smaller Problem : Assume the recursion works and will give you ans for just after the first digit.
  • Self Work : In order to make you smaller prblm your problem all you need to work for the 0th index element. Because it could be the part included in the answer or not. So first number could be mapped as it is or can be mapped by including just the next digit with. For e.g…, 123 either first digit will be mapped as β€˜1’ or as β€˜12’ but not for β€˜123’

Note : Do handle that the number should be smaller than 26 as for two digit number could be like 321 so your recursion will take either 3 or 32 but 32 is not valid.

I am not able to write code for this problem, could you help me?

Yes sure , just a hint
2 Recursive call (lagega)
1st one is 1 length subString and second one is 2 length of subString