You are given an array A of size N. You need to print the total count of sub-arrays having their sum equal to 0
First line of the input contains an integer T denoting the number of test cases. Each test case consists of two lines. First line of each test case contains an Integer N denoting the size of the array, and the second line contains N space separated integers.
For each test case, in a new line, print the total number of subarrays whose sum is equal to 0.
1 <= T <= 100
1 <= N <= 107
-1010 <= Ai <= 1010
0 0 5 5 0 0
6 -1 -3 4 -2 2 4 6 -12 -7
Testcase 1: There are 6 subarrays present whose sum is zero.
Testcase 2: There are 4 subarrays present whose sum is zero.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.