I'm afraid my soln is correct..I was not expecting it


#1

int solve(int* A, int n1) {
int max = A[0];
int min = A[0];
int i = 0;
for( i = 0; i < n1; i++){
if(max < A[i]){
max = A[i];
}
if(min > A[i]){
min = A[i];
}
}
return max + min;

}