Easy and small sorted solution c++


#1

int Solution::solve(vector &A) {
sort(A.begin(),A.end());
int len=A.size();

int mm=A[len-1]+A[0];
return mm;

}