LeetCode 1491. Average Salary Excluding the Minimum and Maximum Salary in F#
URL
Average Salary Excluding the Minimum and Maximum Salary - LeetCode
Code
https://github.com/syohex/dotnet-study/tree/master/fsharp/leetcode/problems/1491/main.fsx
let average (salary: int list) : double =
let len = List.length salary
(salary |> List.sort |> List.take (len - 1) |> List.skip 1 |> List.sum |> double)
/ (len - 2 |> double)