Increase Subarray Javascript Interview Programming