hi i'm trying to tranform while loop to a recursive function to read the array from left to right and then another version from right to left but i'm just unable ! can i have some idea ?
#include<stdio.h>
#define DIM 10
int csTrie(int n, int *tab){
int i=0;
while(i<(n-1)&&tab[i]<=tab[i+1]){
i++;
}
return i==(n-1);
}
void main(){
int tab[DIM]={2,3,4,6,9};
int i=0;
printf("LOGICFOUND:%d\n", csTrie(5, tab));
}