public class Solution {
public int arrayPairSum(int[] nums) {
Arrays.sort(nums);
int sum=0;
for(int i=0;i<nums.length;i+=2){
sum+=nums[i];
}
return sum;
}
}
Java short Solution Sorting based with odd positions sum

@1337pino said in Java short Solution Sorting based with odd positions sum:
yup makes it even more simple!