# https://leetcode.com/problems/minimum-average-of-smallest-and-largest-elements/
class Solution:
def minimumAverage(self, nums: List[int]) -> float:
nums.sort()
return min((x + y) / 2 for x, y in zip(nums, nums[::-1]))
minimum-average-of-smallest-and-largest-elements
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||