You are given an array of unique integers
salary
wheresalary[i]
is the salary of theith
employee.
Return the average salary of employees excluding the minimum and maximum salary. Answers within10^-5
of the actual answer will be accepted.
Constraints:
3 <= salary.length <= 100
1000 <= salary[i] <= 10^6
- All the integers of
salary
are unique.
給你一個只包含唯一整數的陣列
salary
,其中salary[i]
是第ith
員工的薪水。
回傳除了最高薪與最低薪以外每個員工的平均薪水。答案在誤差小於10^-5
之下都會被接受。
限制:
3 <= salary.length <= 100
1000 <= salary[i] <= 10^6
- 所有
salary
裡面的整數都是唯一的。
LeetCode
C++