Solution by Sanket D
Code
![catty.gif](https://assets.leetcode.com/users/images/e9c1e599-6be4-4763-a372-0cd029a2f3ca_1743792467.561668.gif)


# Code
```cpp []
class Solution {
public:
    double minimumAverage(vector<int>& nums) {
        int n = nums.size();
        sort(nums.begin(), nums.end());
        vector<double> avg;

        int start = 0; 
        int end = n;
        for(int i=0; i<n/2; i++){
            int min = nums[start];
            int max = nums[end-1];
            double avgN = (min+max)/2.0;
            avg.push_back(avgN);
            start++;
            end--;
        }

        double minimum=avg[0];
        for(int m=1; m<n/2; m++){
            cout<<avg[m]<<" ";
            if(minimum>avg[m]){
                minimum = avg[m];
            }
        }
        return minimum;
    }
};
```
['C++']