Given a 2D matrix, find the number non-empty sub matrices, such that the sum of the elements inside the sub matrix is equal to 0. (note: elements might be negative).
Example:
Input
-8 5 7
3 7 -8
5 -8 9
Output
2
Explanation
-8 5 7
3 7 -8
5 -8 9
-8 5 7
3 7 -8
5 -8 9
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.