• + 0 comments

    This line is unnecessary due to the fact that the default value of long in Java is 0L and there is no need for assigning them again to 0.

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