simple solution using while loop with good beat %
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    double minimumAverage(vector<int>& nums) {\n        double  m;\n        int n=nums.size();\n        \n        sort(nums.begin(),nums.end());\n        double  mini=nums[n-1];\n        int i=0;\n        int j=nums.size()-1;\n        while(i<j)\n        {\n            double sum=0;\n            sum=nums[i]+nums[j];\n            m=sum/2;\n            mini=min(mini,m);\n            i++;\n            j--;\n        }\n        return mini;\n    }\n};\n```
['C++']