| 6 | using namespace std; |
| 7 | |
| 8 | void sequence(string s, string temp, int index){ |
| 9 | |
| 10 | if (s.size()==index){ //Base Case |
| 11 | cout<<temp<<" "; |
| 12 | return; |
| 13 | } |
| 14 | |
| 15 | // take |
| 16 | sequence(s,temp+s[index],index+1); |
| 17 | |
| 18 | // not take |
| 19 | sequence(s,temp,index+1); |
| 20 | |
| 21 | } |
| 22 | |
| 23 | int main(){ |
| 24 |