MCPcopy Create free account
hub / github.com/chaharnishant11/CodeIn10DSA / helper

Method helper

Recursion/Homework/possibleWordsFromPhone.cpp:19–27  ·  view source on GitHub ↗

Function to find list of all words possible by pressing given numbers.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

helperFunction · 0.70

Tested by

no test coverage detected