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

Function helper

Recursion/Homework/reverse.cpp:4–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2using namespace std;
3int n;
4void helper(int* s,int start,int end){
5 if (start>=end){
6 for (int i=0;i<n;i++){
7 cout<<s[i]<<" ";
8 }
9 cout<<endl;
10 }
11 else{
12 int temp = s[start];
13 s[start] = s[end];
14 s[end] = temp;
15 return helper(s, start + 1 , end-1);
16 }
17}
18int main() {
19 int t;
20 cin>>t;

Callers 13

helperMethod · 0.70
AllPossibleStringsMethod · 0.70
mainFunction · 0.70
helperMethod · 0.70
isSubsetSumMethod · 0.70
helperMethod · 0.70
subsetsMethod · 0.70
helperMethod · 0.70
permuteMethod · 0.70
helperMethod · 0.70
isPalindromeMethod · 0.70
helperMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected