} Driver Code Ends
| 4 | |
| 5 | // } Driver Code Ends |
| 6 | class 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. |
| 33 | int main(){ |
nothing calls this directly
no outgoing calls
no test coverage detected