Short C++17 solution


#1
auto [mn,mx] = std::minmax_element(std::begin(A), std::end(A));
return *mn + *mx;