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

Function issorted

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

Source from the content-addressed store, hash-verified

6#define mod 1000000007
7#define endl '\n'
8bool issorted(int arr[],int i,int n){
9 if(i==n-1)
10 return true;
11 if(arr[i+1]>arr[i] and issorted(arr,i+1,n))
12 return true;
13 return false;
14}
15int main(){
16 cin.tie(0)->sync_with_stdio(0);
17 int arr[]={1,2,3,4,5,3};

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected