given an array and a number, find a cont sub-array whose sum equals to that given number.
Anonymous
Use sliding window and add elements from the starting index. If the sum of the subarray is greater than the required sum, start removing elements from the beginning of the subarray. In this way traverse the entire subarray until you find the answer.
Check out your Company Bowl for anonymous work chats.