Greedy approach - python
\nclass Solution:\n    def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        nums.sort(key=abs, reverse=True)\n        for i in range(le
```\nclass Solution:\n    def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        nums.sort(key=abs, reverse=True)\n        for i in range(len(nums)):\n            if nums[i] < 0 and k > 0:\n                nums[i] *= -1\n                k -= 1\n            if k == 0:\n                break\n        if k % 2 != 0:\n            nums[-1] *= -1\n        return sum(nums)\n\t\t```
['Greedy', 'Python', 'Python3']