Simple Easy Solution java || Easy Approach || Beats 100 % users in time  & space complexity
Intuition\n Describe your first thoughts on how to solve this problem. \nTo reduce time complexity we are using sorting \n\n# Approach\n Describe your approach 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nTo reduce time complexity we are using sorting \n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n```\n1. sort the array\n2. perform the operation \n    Add (minElement + maxElement) / 2 to averages.\n    (nums[i]+nums[(n-1)-i])/2.0\n3. add it in list \n4. sort list\n5. return first element of list\n```\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![Screenshot (240).png](https://assets.leetcode.com/users/images/a5e6aa5e-1437-49e0-a1fc-a4cc69d2c8da_1719210888.4156938.png)\n\n# Code\n```\nclass Solution {\n    public double minimumAverage(int[] nums) {\n        List<Double> list = new ArrayList<>();\n        Arrays.sort(nums);\n        int n = nums.length;\n        for(int i = 0; i < n/2;i++){\n            list.add((nums[i]+nums[(n-1)-i])/2.0);\n        }\n        Collections.sort(list);\n        return list.get(0);\n    }\n}\n```
['Array', 'Sorting', 'Java']