Smart keypad advanced

sample input

34

sample output

vidhi
divyam
sneha

how i am not getting. please explain.

have a look at your phone keypad ( or the keypad used in old phones )
3 contains letters d,e,f
4 contains letters g,h,i
since divyam contains d(see 3) and i(see 4) it is a valid string and should be printed
also, sneha contains e(see 3) and h(see 4) it is also valid.

for 34
senah is valid string or not ??
i think it is valid because it contain e(see 3) and h(see 4).
only different is ‘e’ and ‘h’ are not consecutive.
what’is answer is it valid or not.

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.

1 Like

@Saurabh-Kumar-1331476656958199 , saurabh is my above assumption is correct or not.