Java - 99.9%, 1 ms , only sorting
\n private int largestSumAfterKNegations(int[] A,int K){\n        Arrays.sort(A); \n        int minIdx = 0;\n        while(K-- > 0){\n            if(minIdx < A.
```\n private int largestSumAfterKNegations(int[] A,int K){\n        Arrays.sort(A); \n        int minIdx = 0;\n        while(K-- > 0){\n            if(minIdx < A.length && A[minIdx] < 0){\n                A[minIdx] = -A[minIdx];\n\t\t\t\t//Move minIdx only if the next number is less than min\n                if(minIdx+1 < A.length && A[minIdx+1] < A[minIdx])minIdx++;\n            }else{\n                 A[minIdx] = -A[minIdx];\n            }\n            \n        }\n        int sum = 0;\n        for(int num:A){\n            sum += num;\n        }\n        return sum;\n    }\n```
[]