• + 0 comments

    You don't have to do this:

    for(int i=0;i<n;i++) arr[i]=0;
    

    because long by default is 0