MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / main

Method main

PrintNumPadPermutation.java:4–26  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

2public class Main
3{
4 public static void main(String[] args)
5 {
6 String input = "24";
7
8 HashMap<Character,String> map = new HashMap<>();
9 map.put('2',"abc");
10 map.put('3',"def");
11 map.put('4',"ghi");
12 map.put('5',"jkl");
13 map.put('6',"mno");
14 map.put('7',"pqr");
15 map.put('8',"stuv");
16 map.put('9',"wxyz");
17
18 int n = input.length();
19 ArrayList<String> r = solve(map,input,n);
20
21 for(int i=0;i<r.size();i++)
22 {
23 System.out.println(r.get(i));
24 }
25
26 }
27
28 public static ArrayList<String> solve(HashMap<Character,String> map,String input,int n)
29 {

Callers

nothing calls this directly

Calls 1

solveMethod · 0.95

Tested by

no test coverage detected