Percentile calculation

前端 未结 3 1628
庸人自扰
庸人自扰 2020-12-29 22:43

I want to mimic the Excel equivalent PERCENTILE function in C# (or in some pseudo code). How can I do that? The function should take two arguments where the fir

3条回答
  •  旧时难觅i
    2020-12-29 22:50

    Add the values to a list, sort that list, and take the index value ceil(length of the list * percentile).

提交回复
热议问题