C# | Linear Approach
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nPointer technique\n\n# 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nPointer technique\n\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\npublic class Solution {\n    public int MinimumAverageDifference(int[] nums) {\n        long leftSum = 0;\n        long rightSum = nums.Sum(n => (long)n);\n\n        int leftDivisor = 0;\n        int rightDivisor = nums.Length;\n        long bestAvg =Int32.MaxValue;\n        int bestAvgIdx =0;\n        \n\n        for(int i=0; i< nums.Length; i++)\n        {\n             leftSum += nums[i];\n             rightSum -= nums[i];\n\n             leftDivisor +=1;\n             rightDivisor = rightDivisor-1 == 0 ? 1: rightDivisor-1;\n\n            int bestScore = (int)Math.Abs(leftSum / leftDivisor - rightSum / rightDivisor);\n\n            if (bestScore < bestAvg)\n            {\n                bestAvgIdx = i;\n                bestAvg = bestScore;\n            }\n        }\n        return bestAvgIdx;\n    }\n}\n```
['C#']