LeetCode 1337. The K Weakest Rows in a Matrix in F#

URL

https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/description/?envType=daily-question&envId=2023-09-18

Code

https://github.com/syohex/dotnet-study/blob/master/fsharp/leetcode/challenge/202309/the_k_weakest_rows_in_a_matrix/main.fsx

let kWeakestRows (mat: int list list) (k: int) : int list =
    mat
    |> List.map List.sum
    |> List.indexed
    |> List.sortBy snd
    |> List.take k
    |> List.map fst