Python use min heap to always operate the minElement K times
\nimport heapq\nclass Solution:\n    def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        n = len(nums)\n        heapq.heapify(nums)\n 
```\nimport heapq\nclass Solution:\n    def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        n = len(nums)\n        heapq.heapify(nums)\n        while k > 0:\n            _min = heapq.heappop(nums)\n            heapq.heappush(nums, -_min)\n            k -= 1\n        res = 0\n        while n > 0:\n            res += heapq.heappop(nums)\n            n -= 1\n        return res\n```
['Greedy', 'Python']