Given an integer array nums (can have negative numbers) and integer , find the length of the shortest non-empty subarray with sum at least . Return -1 if no such subarray exists. Example: nums = [2, -1, 2], k = 3. The subarray [2, -1, 2] has sum 3 and length 3. That's the shortest.
Answer: 3. This problem is tricky because negative numbers break the sliding window approach. You can't just shrink from the left when the sum exceeds . This requires a different kind of monotonic queue.