Solution in Python 3 (beats ~100%)
```\nclass Solution:\n    def largestSumAfterKNegations(self, A: List[int], K: int) -> int:\n    \tS, a = sum(A), sorted([i for i in A if i < 0])\n    \tL, b = 
```\nclass Solution:\n    def largestSumAfterKNegations(self, A: List[int], K: int) -> int:\n    \tS, a = sum(A), sorted([i for i in A if i < 0])\n    \tL, b = len(a), min([i for i in A if i >= 0])\n    \tif L == 0: return S if K % 2 == 0 else S - 2*b\n    \tif K <= L or (K - L) % 2 == 0: return S - 2*sum(a[:min(K,L)])\n    \treturn S - 2*sum(a[:-1]) if -a[-1] < b else S - 2*sum(a) - 2*b\n\t\t\n\t\t\n- Junaid Mansuri
['Python', 'Python3']