Find the K-Sum of an Array
You're 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.
The K-Sum of the array is defined as the kth largest subsequence sum that can be obtained (not necessarily distinct).
Your task is to print 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 subsequence is considered to have a sum of 0.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)