Find the K-Sum of an Array at HubSpot
Hard41.1% acceptance
This problem has 50.0% frequency at HubSpot.
Problem Description
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...
Read full problem and hintsTopics
Also asked at 2 companies
More HubSpot Questions
Merge Sorted ArrayEasyTwo SumEasyMerge IntervalsMediumSimple Bank SystemMediumTop K Frequent ElementsMedium
View all HubSpot questions