Easy Python3 Intuition Approach
Code1\n\nclass Solution:\n    def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        for i in range(k):\n            n=nums.index(min(num
# Code1\n```\nclass Solution:\n    def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        for i in range(k):\n            n=nums.index(min(nums))\n            nums[n]=-1*nums[n]\n        return sum(nums)\n```\n\n# Code2\n\n```\nclass Solution:\n    def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:\n        for i in range(k,0,-1):\n            if min(nums)>=0 and i%2==0:return sum(nums)\n            n=nums.index(min(nums))\n            nums[n]=-1*nums[n]            \n        return sum(nums)\n```
['Python3']