Why is this solution not working for this Problem?

Why is this solution not working for this Problem?
https://practice.geeksforgeeks.org/problems/subarray-with-0-sum/0