Python Solution - we don't need a heap queue!
Solving for k== 0 is obvious: simply calculate the sum of the positive numbers.\n\nFor each case of k > 0 you need a less optimum answer. You get a lower answer
Solving for k== 0 is obvious: simply calculate the sum of the positive numbers.\n\nFor each case of *k > 0* you need a less optimum answer. You get a lower answer by \n\n- Subtracting one or more of the positive items you added\n-  Adding one of more of the negative items you didn\'t add originally\n\nThere are *n* possible actions to choose from. You can choose to make each change independentally of every other changes, which means there are *2^n* **combinations** of actions to choose from. Each action doubles the number of possible results.\n\nYou obviously cannot calculate every possible combination of actions for a non-minimal size of n.\n\nSo just continually pare down the result set. With each action you double the possible number of combinations, then reduce it down to the top *k* combinations. \n\n````\nclass Solution:\n    def kSum(self, nums, k: int) -> int:\n        sumPositives = sum(n for n in nums if n > 0)\n        diffs = sorted([abs(n) for n in nums])\n        subtractValues = [0]\n        for n in diffs:\n            newValues = []\n            for p in subtractValues:\n                newValue = p+n\n                if len(subtractValues) == k and subtractValues[-1] < newValue:\n                    break\n                newValues.append(newValue)\n            if not newValues:\n                break\n            subtractValues.extend(newValues)\n            subtractValues.sort()\n            del subtractValues[k:]\n            \n        return sumPositives - subtractValues[-1]\n````
['Python']