From f270b59acdb85a9d361d867f707df6acce1ba605 Mon Sep 17 00:00:00 2001 From: tiyarocks <51966091+tiyarocks@users.noreply.github.com> Date: Tue, 15 Oct 2019 19:26:53 +0530 Subject: [PATCH] Add files via upload --- rec_sort.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 rec_sort.cpp diff --git a/rec_sort.cpp b/rec_sort.cpp new file mode 100644 index 00000000..41bc9a33 --- /dev/null +++ b/rec_sort.cpp @@ -0,0 +1,39 @@ +#include +using namespace std; + + +bool isSorted(int*a ,int n) +{ + if(n==1) + { + return true; + + } + if(a[0]>N; //no_of_elements + for(i=0; i>arr[i]; + + } + if(isSorted(arr,N)){ + cout<<"True"; + + } + else{ + cout<<"False"; + } + return 0; +}