1491. 去掉最低工资和最高工资后的工资平均值
class Solution {
public double average(int[] salary) {
Arrays.sort(salary);
salary[0] = 0;
for(int i = 1;i < salary.length - 1;i++){
salary[0] += salary[i];
}
return salary[0] * 1.0 / (salary.length - 2);
}
}