Brute force (It gives TLE‼)
\n\n\n\tclass Solution {\n\tpublic:\n\t\tvector getSumAbsoluteDifferences(vector& nums) {\n\t\t\tvectorans;\n\t\t\tfor(int i=0;i<nums.size();i++){\n\t\t\t\tint 
![image](https://assets.leetcode.com/users/images/756ec323-c8d2-46dc-b99b-afcebde01982_1656576984.4134269.png)\n\n\n\tclass Solution {\n\tpublic:\n\t\tvector<int> getSumAbsoluteDifferences(vector<int>& nums) {\n\t\t\tvector<int>ans;\n\t\t\tfor(int i=0;i<nums.size();i++){\n\t\t\t\tint sum=0;\n\t\t\t\tfor(int j=0;j<nums.size();j++) sum+=abs(nums[j]-nums[i]);\n\t\t\t\tans.push_back(sum);\n\t\t\t}\n\t\t\treturn ans;\n\t\t}\n\t};
['C', 'C++']