Tap here to switch tabs
Problem
Submissions

Problem: Average Salary Excluding the Minimum and Maximum Salary

Average Salary Excluding the Minimum and Maximum Salary asks you to return the average of an array's employee salaries after leaving out the lowest and highest salaries.

Statement

You are given an array of unique integers salary, where salary[i] represents the salary of the iextthi^{ ext{th}} employee.

Return the average salary of employees, excluding the minimum and maximum salary.

Constraints:

  • 3≤3 \leq salary.length ≤100\leq 100

  • 1000≤1000 \leq salary[i] ≤106\leq 10^6

  • All integers in salary are unique.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Average Salary Excluding the Minimum and Maximum Salary

Average Salary Excluding the Minimum and Maximum Salary asks you to return the average of an array's employee salaries after leaving out the lowest and highest salaries.

Statement

You are given an array of unique integers salary, where salary[i] represents the salary of the iextthi^{ ext{th}} employee.

Return the average salary of employees, excluding the minimum and maximum salary.

Constraints:

  • 3≤3 \leq salary.length ≤100\leq 100

  • 1000≤1000 \leq salary[i] ≤106\leq 10^6

  • All integers in salary are unique.