C++|| Only For Beginners || Simple and Clean Solution
Please Upvote If it helped You !!!\nHappy Coding :)\n\nint largestSumAfterKNegations(vector<int>& nums, int k) \n    {\n        \n        int sum=0;\n        so
**Please Upvote If it helped You !!!\nHappy Coding :)**\n```\nint largestSumAfterKNegations(vector<int>& nums, int k) \n    {\n        \n        int sum=0;\n        sort(nums.begin(),nums.end());\n        while(k>0)\n        {\n            nums[0]= -1*nums[0];\n            k--;\n            sort(nums.begin(),nums.end());\n        }\n        for(int i=0;i<nums.size();i++)\n        {\n            sum= sum+nums[i];\n        }\n        return sum;\n    }\n```\t
['C']