1918. Kth Smallest Subarray Sum
https://leetcode.com/problems/kth-smallest-subarray-sum
Description
Given an integer array nums
of length n
and an integer k
, return the kth
smallest subarray sum.
A subarray is defined as a non-empty contiguous sequence of elements in an array. A subarray sum is the sum of all elements in the subarray.
Example 1:
Example 2:
Constraints:
n == nums.length
1 <= n <= 2 * 104
1 <= nums[i] <= 5 * 104
1 <= k <= n * (n + 1) / 2
ac
Last updated