int i = 0;
int min = x[i];
while ( i < n ){
if ( x[i] < min ){
min = x[i];
}
i++;
}
return min;
I've written the iterative form to find the min number of an array. But I'd like to write a function that with recursion. Please help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…