C Simple Program
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```c []
double minimumAverage(int* nums, int numsSize) {
    int m,n,k=-1;
    double x=200.0;
    double arr[numsSize/2];
    while(numsSize!=0){
        int max=0,min=51,b=0,a=0;
    for(int i=0;i<numsSize;i++){
        if(max<nums[i]){
            m=i;
           max=nums[i];
        }
        if(min>nums[i]){
            n=i;
           min=nums[i];
        }
    }
    k++;
    printf(" %d %d ",min,max);
    arr[k]=(min+max)/2.0;
    //printf("%lf ",arr[k]);
    for(int i=0;i<numsSize;i++){
        if(nums[i]==max && b<1){
            for(int j=i;j<numsSize-1;j++){
                nums[j]=nums[j+1];
            }
            b++;
              i--;
        }
        else if(nums[i]==min && a<1){
            for(int j=i;j<numsSize-1;j++){
                nums[j]=nums[j+1];
            }
            a++;
              i--;
        }
    }
     numsSize=numsSize-2;
    for(int i=0;i<numsSize;i++){
      //printf("%d ",nums[i]);
   }
    }
   for(int i=0;i<=k;i++){
       if(x>arr[i])
         x=arr[i];
   }
   return x;
}
```
['C']