1491. Average Salary Excluding the Minimum and Maximum Salary
On This Page
class Solution:
def average(self, salary: List[int]) -> float:
s = sum(salary) - min(salary) - max(salary)
return s / (len(salary) - 2)
class Solution:
def average(self, salary: List[int]) -> float:
s = sum(salary) - min(salary) - max(salary)
return s / (len(salary) - 2)