Simple || Easiest Approach ✅
Proof 👇🏻https://leetcode.com/problems/minimum-average-of-smallest-and-largest-elements/submissions/1602506785Complexity
Time complexity:O(n)

Space complexity:O
# Proof 👇🏻
https://leetcode.com/problems/minimum-average-of-smallest-and-largest-elements/submissions/1602506785

# Complexity
- Time complexity:O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public double minimumAverage(int[] nums) {
        Arrays.sort(nums);
        double avg[] = new double[nums.length/2];
        int si =0;
        int ei = nums.length-1;
        int k=0;
        while(si<ei){
            double a = nums[si]+nums[ei];
            avg[k] = (double)a/2;
            k++;
            si++;ei--;
        }
        double min = Integer.MAX_VALUE;
        for(int i=0; i<avg.length; i++){
            if(avg[i]<min){
                min = avg[i];
            }
        }
        return min;
    }
}
```
['Java']