Longest Subarray With Given Sum Leetcode Javascript Problems