very easy to understand, 
IntuitionThe problem requires finding the k-th largest subsequence sum in an array.Key observations:
The maximum possible sum is obtained by summing all positiv
# Intuition
The problem requires finding the k-th largest subsequence sum in an array.

**Key observations:**
The maximum possible sum is obtained by summing all positive numbers in the array.
Each subset sum can be derived by selectively subtracting elements from this maximum sum.
We can efficiently generate the largest subset sums using a priority queue (min-heap), which tracks the smallest reductions from the maximum sum.

# Approach

**Compute the Maximum Possible Sum:**
Sum all positive numbers in nums to get maxSum, which is the largest subset sum.
Convert all elements in nums to their absolute values to simplify calculations.
Sort nums in increasing order of absolute values to process smaller reductions first.

**Use a Min-Heap to Track the k-th Largest Subset Sum:**
Start with the smallest possible reduction (nums[0]), stored in a min-heap.
Pop the smallest reduction, compute the new subset sum (maxSum - currSum), and push new possible reductions:
Include the next element in the sequence.
Replace the last element of the current sequence with the next one.
Repeat until we extract the k-th largest sum.

**Return the k-th Largest Subset Sum.**

# Complexity
- Time complexity:
O(nlogn+klogk).

- Space complexity:
O(k).

# Code
```cpp []
class Solution {
public:
    long long kSum(vector<int>& nums, int k) {
        long long maxSum = 0;
        for (int &num : nums) {
            if (num > 0) maxSum += num;  // Compute the max possible sum
            num = abs(num);  // Convert numbers to absolute values
        }

        // Sort in increasing order of absolute value
        sort(nums.begin(), nums.end());

        // Min-heap to track the k smallest sum reductions
        priority_queue<pair<long long, int>, vector<pair<long long, int>>, greater<>> pq;
        pq.push({nums[0], 0});  // Smallest subset sum starts from the first element
        long long res = maxSum;

        // Extract (k-1) elements since maxSum is the 1st largest subset sum
        for (int i = 1; i < k; ++i) {
            auto [currSum, idx] = pq.top();
            pq.pop();
            res = maxSum - currSum;  // The k-th largest sum

            // Push next possible sums into the min-heap
            if (idx + 1 < nums.size()) {
                pq.push({currSum + nums[idx + 1], idx + 1});
                pq.push({currSum - nums[idx] + nums[idx + 1], idx + 1});
            }
        }

        return res;
    }
};

```
['C++']