explanation
Intuition\n Describe your first thoughts on how to solve this problem.\n\n1 first i thoght sort the nums\n2 iterate the array from front and back and find the a
# Intuition\n<!-- Describe your first thoughts on how to solve this problem.-->\n\n1 first i thoght sort the nums\n2 iterate the array from front and back and find the averrage of    tow         element  \n3 then insert in the new array and then increment i and decrement j while i <j after that sort the new array and then return newarray[0]\n \n  \n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Sort the array \n2. Using two pointers (i and j), the calculation of averages and tracking the minimum The variable minAvg keeps track of the smallest average during the loop.\n\n\n\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n        O(nlogn) \n\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n        O(1)\n# Code\n```java []\nclass Solution {\n    public double minimumAverage(int[] nums) {\n         Arrays.sort(nums);\n\n        int i = 0;\n        int j = nums.length - 1;\n        double minAvg = Double.MAX_VALUE;\n\n        while (i < j) {\n            double avg = (nums[i] + nums[j]) / 2.0;\n            minAvg = Math.min(minAvg, avg);\n            i++;\n            j--;\n        }\n\n        return minAvg;\n    }\n        \n    }\n\n```
['Java']