hi
can anyone help me please
i want to write a recursive function that will find the minimum value of integer array and return this value the function takes an integer array and the array size as arguments.
i tried to solve it like this and it doesn't work so please tell me what is wrong?
int min(int a[] , int s) {
if ( s==1 )
return a[0];
else if( s>1){
if(min(a, s-1) < a[s])
return min(a, s-1);
else return a[s];
}
}