Problem

Given an unsorted array of non-negative integers A and a number sum, find a continuous subarray that adds up to sum

Brute force approach


Window sliding approach