Very Very Very east solution C++


#1

int Solution::solve(vector &A) {
int minimum = A[0],maximum = A[0];

for(int i = 1;i<A.size();i++){
    maximum = max(maximum,A[i]);
    minimum = min(minimum,A[i]);
}
return minimum + maximum;}