You are given an array salary where salary[i] is the salary of the i-th employee. Return the average salary of employees excluding the minimum and maximum salary, rounded to 5 decimal places.
Input: An integer array salary of length n.
Output: A float — average salary excluding min and max.
Input: [4000,3000,1000,2000]
Output: 2500.00000
Explanation: Remove min(1000) and max(4000). Average of [3000,2000] = 2500.Input: [1000,2000,3000]
Output: 2000.00000
Explanation: Remove 1000 and 3000. Average of [2000] = 2000.Input: [6000,5000,4000,3000,2000,1000]
Output: 3500.00000
Explanation: Remove 1000,6000. Average of [5000,4000,3000,2000] = 3500.3<=salary.length<=1001000<=salary[i]<=10^6