[Python3] Priority Queue (Min Heap) - Easy Understanding
TC: O(n + klog(x)) with x < n\nSC: O(1)\n\n\ndef largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        heapify(nums)\n        \n        for 
TC: O(n + klog(x)) with x < n\nSC: O(1)\n\n```\ndef largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        heapify(nums)\n        \n        for _ in range(k):\n            heapreplace(nums, -nums[0])\n        return sum(nums)\n```
['Heap (Priority Queue)', 'Python', 'Python3']