DO i need to make first combinations of strings like in smart keypad 1 and then search that combination in a string of arrays. I thought this i implemented this, According to me, it should be correct answer but its not, Can anyone help me in understand the question with example
Didnt get the question accurately
Hi Mudit,
In this question you have to take input of a numeric string,then let you input number say 34(as in the sample test case) ,then you have to check that the strings created by the numeric string is the substring of which strings in the given vector of strings str(given in the question).for eg when you enter 34 the strings are, dg,dh,di,eg,eh,ei,fg,fh,fi (acc to the phone keypad) then check whether dg is the substring of any of the string in the given strings,if yes then print that string else dont print.repeat the same process for all the strings formed by 34.dh is present in vidhi so vidhi got printed,di is present in divyam so divyam got printed and eh is present in sneha so sneha is printed.
Do i have to create a hashmap first mapping all digits with the specified strings and in the question itself it is not specified which digit maps to which string.