6 LINES Solution with C++ STL
c++\nclass Solution {\npublic:\n    int largestSumAfterKNegations(vector<int>& A, int K) {\n        for (int i = 0; i < K; i++)\n        {\n            auto itr
```c++\nclass Solution {\npublic:\n    int largestSumAfterKNegations(vector<int>& A, int K) {\n        for (int i = 0; i < K; i++)\n        {\n            auto itr = min_element(A.begin(), A.end());\n            *itr = -(*itr);\n        }\n        return accumulate(A.begin(), A.end(), 0);\n    }\n};\n```\n**PEACE**
[]