Output is not showing, however i , matched the answer with the editorial, still its not showing the output
import java.util.*;
public class Main
{
public static void main(String[] args) {
// System.out.println(“Hello World”);
Scanner sc= new Scanner(System.in);
String s=sc.next();
keypad(s," ");
}
static String searchIn [] = { "prateek", "sneha", "deepak", "arnav", "shikha", "palak", "utkarsh", "divyam", "vidhi", "sparsh", "akku" };
static String table[]={ " ", ".+@$","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
public static void keypad(String str, String ans)
{
if(str.length()==0)
{
for(String temp:searchIn)
{
if(temp.contains(ans))
{
System.out.println(temp);
}
}
return;
}
char cc=str.charAt(0);
String ros=str.substring(1);
String code=table[cc-'0'];
for(int i=0;i<code.length();i++)
{
keypad(ros,ans+code.charAt(i));
}
}
}