[LeetCode] Find the K-Sum of an Array

1 · · Aug. 21, 2022, 6:32 a.m.
2386. Find the K-Sum of an Array You are given an integer array nums and a positive integer k. You can choose any subsequence of the array and sum all of its elements together. We define the K-Sum of the array as the kth largest subsequence sum that can be obtained (not necessarily distinct). Return the K-Sum of the array. A subsequence is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements. Note that the empty sub...