Function to find list of all words possible by pressing given numbers.
| 17 | vector<string> ans; |
| 18 | //Function to find list of all words possible by pressing given numbers. |
| 19 | void helper(int a[],int n,string temp,int i){ |
| 20 | if (i==n){ |
| 21 | ans.push_back(temp); |
| 22 | return; |
| 23 | } |
| 24 | for (int j=0;j<keys[a[i]].size();j++){ |
| 25 | helper(a,n,temp+keys[a[i]][j],i+1); |
| 26 | } |
| 27 | } |
| 28 | vector<string> possibleWords(int a[], int N) |
| 29 | { |
| 30 | //Your code here |