Given an array of positive integers and an integer k, find the minimum length of a contiguous subarray of which the sum is at least k. If there is no such subarray, return -1.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.