Solution By Dare2Solve | Detailed Solution
Explanation []\nauthorslog.vercel.app/blog/DtWuGdyF0r\n\n\n# Code\n\ncpp []\nclass Solution {\npublic:\n    double minimumAverage(std::vector<int>& nums) {\n   
```Explanation []\nauthorslog.vercel.app/blog/DtWuGdyF0r\n```\n\n# Code\n\n```cpp []\nclass Solution {\npublic:\n    double minimumAverage(std::vector<int>& nums) {\n        int res = 100;\n        sort(nums.begin(), nums.end());\n        for (int i = 0; i < nums.size() / 2; ++i) {\n            res = min(res, nums[i] + nums[nums.size() - i - 1]);\n        }\n        return res / 2.0;\n    }\n};\n```\n\n```python []\nclass Solution:\n    def minimumAverage(self, nums: List[int]) -> float:\n        nums.sort()\n        res = 100\n        for i in range(len(nums) // 2):\n            res = min(res, nums[i] + nums[len(nums) - i - 1])\n        return res / 2\n```\n\n```java []\nclass Solution {\n    public double minimumAverage(int[] nums) {\n        double res = 100;\n        Arrays.sort(nums);\n        for (int i = 0; i < nums.length / 2; ++i) {\n            res = Math.min(res, nums[i] + nums[nums.length - i - 1]);\n        }\n        return res / 2;\n    }\n}\n```\n\n```javascript []\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar minimumAverage = function (nums) {\n  var res = 100;\n  nums.sort((a, b) => a - b);\n  for (var i = 0; i < nums.length >> 1; ++i) {\n    res = Math.min(res, nums[i] + nums[nums.length - i - 1]);\n  }\n  return res / 2;\n};\n```\n\n```golang []\nfunc minimumAverage(nums []int) float64 {\n    sort.Ints(nums)\n    res := 100.0\n    for i := 0; i < len(nums)/2; i++ {\n        res = math.Min(res, float64(nums[i]+nums[len(nums)-i-1]))\n    }\n    return res / 2\n}\n```\n\n```csharp []\npublic class Solution {\n    public double MinimumAverage(int[] nums) {\n        double res = 100;\n        Array.Sort(nums);\n        for (int i = 0; i < nums.Length / 2; ++i) {\n            res = Math.Min(res, nums[i] + nums[nums.Length - i - 1]);\n        }\n        return res / 2;\n    }\n}\n```
['Python', 'C++', 'Java', 'Go', 'Python3', 'JavaScript', 'C#']