C++ Min Heap Solution
\nclass Solution {\npublic:\n    int largestSumAfterKNegations(vector<int>& A, int k) {\n       priority_queue<int, vector<int>, greater<int>> pq(A.begin(), A.e
```\nclass Solution {\npublic:\n    int largestSumAfterKNegations(vector<int>& A, int k) {\n       priority_queue<int, vector<int>, greater<int>> pq(A.begin(), A.end());\n        while(k--){\n            int t=pq.top();pq.pop();\n            pq.push(t*-1);\n        }\n    \n        int n=0;\n       while(!pq.empty()){\n           int t=pq.top();pq.pop();\n           n+=t;\n       }\n        return n;\n    }\n};\n```
['C', 'Heap (Priority Queue)', 'C++']