For this Question: You are given an array of n integers. You have to make every number of the array equal. In one step you can increase or decrease any number by 1. Find the minimum step required to make every number of the array equal.1. The first line contains an integer N, denoting the size of the array.
2. The second line has N space-separated integers of the array A.

<b>Constraints :</b>
1 &le; N &le; 2x10<sup>5</sup>
1 &le; A[i] &le; 10<sup>9</sup>Print the minimum number of steps.Sample Input:-
5
2 3 1 5 2

Sample Output:-
5, I have written this Solution Code: import java.util.Scanner;
import java.lang.Math;
import java.util.Arrays;
 public class Main
{
    public static void main(String args[]) {
        
        Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           long a[];
           //long x=in.nextLong();
		// MEMORY ALLOCATION FOR JAVA LONG ARRAY
		a = new long[n];
		// ASSIGNING ELEMENTS TO JAVA LONG ARRAY
		for(int i=0;i<n;i++)
		{
		    long xx;
		     xx = in.nextLong();
		    a[i]=xx;
		}
           //long sum=0;
   Arrays.sort(a);
    long median=a[n/2]; long ans=0;
      for (int i=0;i<n;i++){
		ans+=Math.abs(median-a[i]); //Calculate the cost to modify the stick length
	}
   
           
        System.out.print(ans);
      
        
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?