Smart keypad advanced

The question is not clear, please elaborate. Please explain the example too in detail.

suppose the input is 26
on keypad no. 2 : “abc” is present
and similarly keypad no. 6 : “def”

so if u are given 26 as the input u can produce a, b or c by the keypad no. 2
and d, e or f by keypad no. 6

so if any of the combination (ad, ae, af, bd, be, bf, cd, ce, cf ) which is produced by keypad is present is the given array then print that string.

hope this will help u
pls rate my work

please explain the sample test case for 34 which is giving vidhi,divyam, sneha

sorry sorry
6 pe def nahi balki jkl hoga

input 23 hoga instead of 26

on keypad 3 we have: "def’
n on 4: “ghi”
so the possible combn allowed : dg,dh, di, eg ,eh, ei fg, fh, fi
vidhi is becoz of dh
divyam - di
sneha- eh

so u have to generate all the possible combn of alphabets by given keypad sequence
and that combn is present in the work
just print that word

hope this will help u
pls rate my work

1 Like

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.