For this Question: Given an array <b>A[]</b>, of length <b>N</b> containing zero , positive and negative integers. 
You need to find the length of the largest subarray whose sum of elements is <b>0</b>.The first line contains N denoting the size of the array A. Then in the next line contains N space-separated values of the array A.

<b>Constraints:-</b>
1 <= N <= 1e5
-1e6 <= A[i] <= 1e6Print the length of the largest subarray which has sum 0, If no subarray exist print -1.Sample Input:-
8
15 -2 2 -8 1 7 10 23

Sample Output:-
5

Explanation:-
-2 2 -8 1 7 is the required subarray

Sample Input:-
5
1 2 1 2 3

Sample Output:-
-1, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

int main(){

unordered_map<long long,int> m;
int n,k;
cin>>n;
long a[n];
int ans=-1;
for(int i=0;i<n;i++){cin>>a[i];if(a[i]==0){ans=1;}}
long long sum=0;

for(int i=0;i<n;i++){
    sum+=a[i];
    if(sum==0){ans=max(i+1,ans);}
 if(m.find(sum)==m.end()){m[sum]=i;}
 else{
    ans=max(i-m[sum],ans);
 }
}
cout<<ans;


}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?