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

Class Solution

Recursion/Homework/Subsequences.cpp:6–30  ·  view source on GitHub ↗

} Driver Code Ends

Source from the content-addressed store, hash-verified

4
5 // } Driver Code Ends
6class Solution{
7 public:
8
9 void helper (string s, string tempAns,int index){
10 if (s.size() == index){
11 cout<< tempAns << " ";
12 return;
13 }
14
15 // take
16 helper(s,tempAns+s[index],index+1);
17
18 // not take
19 helper(s, tempAns,index+1);
20
21 return;
22 }
23
24 vector<string> AllPossibleStrings(string s){
25 vector<string> ans;
26 helper(s,"",0);
27 return ans;
28 // Code here
29 }
30};
31
32// { Driver Code Starts.
33int main(){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected