MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / rev_arr

Function rev_arr

CPP/recursion/rev_array.cpp:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#define mod 1000000007
7#define endl '\n'
8void rev_arr(int arr[],int i,int n)
9{
10 if(i>=n/2)
11 return;
12 swap(arr[i],arr[n-i-1]);
13 rev_arr(arr,i+1,n);
14}
15int main(){
16 cin.tie(0)->sync_with_stdio(0);
17 int n;

Callers 1

mainFunction · 0.85

Calls 1

swapFunction · 0.50

Tested by

no test coverage detected