this function has to check if an array is not descending it has to be recursive and it's space complexity has to be O(log(n))
int is_sorted(int a[ ], int n)
if(n==1 || n==0) return 1;
this is what i came up with. i know it's space complexity is O(n) how do i make it O(log(n))?