The problem is not clear

Please explain how we got the possible combinations like*di

@Vishu_1801,

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”
};

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.