Given an integer array *nums*, find the length of the longest subarray whose sum equals 0. If no such subarray exists, return 0.
nums = [array of integers]
integer (max length of subarray summing to 0)
Example 1:
Input:
nums = [1,-1,5,-2,3]
Output:
2
Explanation:
Longest zero-sum subarray is [1, -1] of length 2.
Example 2:
Input:
nums = [2,-2,3,1,-4,2,0]
Output:
5
Explanation:
Longest zero-sum subarray is [3,1,-4,2,0] of length 5.