Easy C++ solution || Very simple approach || Beats 95% in both !!
Code\n\nclass Solution {\npublic:\n    int minimumAverageDifference(vector<int>& nums) {\n        int n = nums.size(), ans = 0, min_avg_diff = INT_MAX;\n       
# Code\n```\nclass Solution {\npublic:\n    int minimumAverageDifference(vector<int>& nums) {\n        int n = nums.size(), ans = 0, min_avg_diff = INT_MAX;\n        long long int sumRight = 0, sumLeft = 0, avgLeft = 0, avgRight = 0; \n        for(int i=0; i<n; i++)\n            sumRight += nums[i];\n        for(int i=0; i<n; i++)\n        {\n            sumLeft += nums[i];\n            sumRight -= nums[i];\n            avgLeft = sumLeft/(i+1);\n            avgRight = i==(n-1) ? 0 : sumRight/(n-i-1);\n            int val = abs(avgLeft - avgRight);\n            if(val < min_avg_diff){\n                min_avg_diff = val;\n                ans = i;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']