Given an integer array nums and an integer k, return the maximum length of a subarray that sums to k. If there is not one, return 0 instead.