How can i generate string from num string?

how can i generate string from num string?

@Vipin_coder,

you are printing all the strings given to you.

Suggested approach:

This problem is almost the same as in smart keypad 1 problem ,i.e,
String table[]= { " ", “.+@$”, “abc”, “def”, “ghi”, “jkl” , “mno”, “pqrs” , “tuv”, “wxyz” }.

So in this question you need to print those strings (from search In array) that contain the strings generated by the alphabetical combination of number given as the input
Ex:- 34
3 => d,e,f
4 => g,h,i
So print all those strings that contain these combinations
dg, dh, di, eg, eh, ei, fg, fh, fi.

Also you only need to print strings from these only
string searchIn [] = {
“prateek”, “sneha”, “deepak”, “arnav”, “shikha”, “palak”,
“utkarsh”, “divyam”, “vidhi”, “sparsh”, “akku”
};

for 102 combination are “. a” , “. b” , it will search for this ryt?

@Vipin_coder,
For 1 we have ‘.+@$’ and for 2 we have abc. For 0 we have “”. Hence for 102 it will a combination of ‘.+@$’ and abc. So yes we will search for the 12 possible combinations

but for 0 , there is space in question plz check it , " "

@Vipin_coder,
It is " ". I misread it, but since it is a single char, the possible permutations will be ‘.+@$’, " " and abc

then i m ryt or wrong?? for 102 combination are “. a” , “. b” , it will search for this ryt?

@Vipin_coder,
No.

See, for 1 we have options: .+@$ ; for 0 we have options: " " ; for 1 we have options: abc

Now for 102 possible combinations will be:

. a
. b
. c
+ a
+ b
+ c
@ a
@ b
@ c
$ a
$ b
$ c

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.