XYZ's event pipeline stores non-negative event weights in an unsorted array. Given nums and a non-negative target, return the shortest non-empty contiguous subarray whose elements sum exactly to target.
Return the inclusive index pair [start, end]. If multiple windows have the same minimum length, return the one with the smallest start index. Return [] if no valid window exists. The input array must not be modified.
nums, a list of non-negative integers, and target, a non-negative integer.[start, end], or an empty list.sum(nums[start:end + 1]) == target.def shortest_subarray_sum(nums, target):