Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 299 Bytes

untitled-10.md

File metadata and controls

15 lines (12 loc) · 299 Bytes

1619. Mean of Array After Removing Some Elements

{% tabs %} {% tab title="Python-game" %}

class Solution:
    def trimMean(self, arr: List[int]) -> float:
        n = len(arr)
        arr.sort()
        return sum(arr[ int(n*0.05):int(n*0.95)])/(0.9*n)

{% endtab %} {% endtabs %}