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

Function sequence

Recursion/Code/Subsequences.cpp:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace std;
7
8void 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
23int main(){
24

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected