Unable to solve

please provide some hint

Hey @kartik-malik

  • Bigger Problem : To Print all of the possible Strings from the given array that contains code generated by given number.
  • Smaller Problem : Assume the recursion works and will give you ans for N - 1 length of String.
  • Self Work : In order to make your smaller problem all you need to do is work for the 0th index element. Because it could be the part included in the answer or not. and self work is to use first character as it is and another time with the next variable.For e.g…,
    In 123 either use 1 as it is or use code for 12 instead.

Note :In the Base all you need to do is to check whether the string code genertated from the number is contained in any of the string array given in the Question.
Hope this might help you :slight_smile:

Hey @kartik-malik
Refer to this if required Smart Keypad-Advanced

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.