Python O(n) Track Balance very Easy
Intuition\nPlease Upvote if this Find HelpFull\uD83D\uDC4D\uD83D\uDC4D\n\n# Code\n\nclass Solution:\n    def getSumAbsoluteDifferences(self, nums: List[int]) ->
# Intuition\nPlease Upvote if this Find HelpFull\uD83D\uDC4D\uD83D\uDC4D\n\n# Code\n```\nclass Solution:\n    def getSumAbsoluteDifferences(self, nums: List[int]) -> List[int]:\n\n        n=len(nums)\n        total=sum(nums)\n        s1=0\n        s2=total\n        arr=[]\n        for i in range(n):\n            arr.append(abs(s1-(nums[i]*i))+abs((s2-(nums[i])*(n-i))) )\n            s1=s1+nums[i]\n            s2=total-s1\n\n        return arr\n```
['Python3']