Minimum Average of Paired Elements 
Intuition
The goal is to find the smallest possible average from pairs of elements in a sorted array.
By sorting the array and pairing elements from both ends (
## **Intuition**  
- The goal is to find the smallest possible average from pairs of elements in a sorted array.  
- By sorting the array and pairing elements from both ends (`nums[i]` and `nums[n-1-i]`), we ensure minimal and maximal values are paired together.  
- The smallest average will be the minimum value in the resulting array of averages.  

## **Approach**  
1. **Sort the array** to easily pair the smallest and largest elements.  
2. **Iterate through the first half of the array**, pairing `nums[i]` with `nums[n-1-i]` and computing their average.  
3. **Store these averages in an array and sort it.**  
4. **Return the smallest value in the array.**  

## **Complexity**  
- **Time complexity:**  
  - `O(n log n)`, due to sorting the array.  
- **Space complexity:**  
  - `O(n)`, since an extra array is used to store the averages.  

## **Code**  
```java
import java.util.Arrays;

class Solution {
    public double minimumAverage(int[] nums) {
        int n = nums.length;
        Arrays.sort(nums);
        double[] result = new double[n / 2];
        for (int i = 0; i < n / 2; i++) {
            result[i] = (double) (nums[i] + nums[n - 1 - i]) / 2;
        }
        Arrays.sort(result);
        return result[0];
    }
}

['Java']