This is the link for my sol.
please help as I am not able to understand whether the approach is right or not please let me know.
This is the link for my sol.
please help as I am not able to understand whether the approach is right or not please let me know.
first make all possible ans for keypad then check they exist on SearchIn string or not
for Ex:
if input is 34
dg
dh
di
eg
eh
ei
fg
fh
fi
now for each you can check it in SearchIn string using KMP algorithm