Implement longest subarray summing to k | Google Interview Question