Error:
Choose wrong algorithm, not two pointer. We need to use hash table to do this. Like two sum, since sum[i] - sum[j] = k => sum[i] - k = sum[j].
So just keep track the sum and find if sum[i] - k is exist or not. Then update the max. length. Also, if m[sum] is exist then ignore it, since we always want to get a shorter starting point.