problem
solution
class Solution { public: int arrayPairSum(vector<int>& nums) { int sum = 0; sort(nums.begin(), nums.end()); for(int i=0; i<nums.size(); i+=2) { sum += nums[i]; } return sum; } };
re
1. Leetcode_easy_561. Array Partition I;
2. Grandyang;
end