3 ms Beats 32.63%||3194.Minimum Average of Smallest and Largest Elements||Easy Solution||Two Pointer
\n# Code\njava []\nclass Solution {\n    public double minimumAverage(int[] nums) {\n       Arrays.sort(nums);\n       int i=0;\n       int j=nums.length-1;\n  
\n# Code\n```java []\nclass Solution {\n    public double minimumAverage(int[] nums) {\n       Arrays.sort(nums);\n       int i=0;\n       int j=nums.length-1;\n       double[] average=new double[nums.length/2];\n       while(nums.length/2<=j){\n       double min=nums[i];\n       double max=nums[j];\n       average[i]=(min+max)/2;\n       i++;\n       j--;\n       }\n       Arrays.sort(average);\n       return average[0];\n    }\n}\n```
['Java']