minimum length subsequence sum at least K
Anonymous User
487

A follow-up to https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/, except for relaxing the "subarray" part. For example, if nums=[4,2,3,1,5], and k = 8, should output [4,5]. Note that the returned array must maintain the same order as they appear in the original array. For example, here in [4,5] 4 appears before 5 in nums and thus is the desired solution.

Any ideas?

Comments (1)