For this Question: Given a binary array A[] of size N. The task is to arrange an array in increasing order.
(O(N) time complexity solution)Every test case contains two lines, first line contains an integer N (size of array) and second line contains space separated elements of array.

1 <= N <= 20
0 <= A[i] <= 1Print a single line containing space separated elements of sorted arrays.Input:
5
1 0 1 1 0

Output:
0 0 1 1 1, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void cal(int arr[], int n){
		int countZ = 0;
		for(int i = 0; i < n; i++) {
			if(arr[i] == 0) {
				countZ++;
			}
		}
		for(int i = 1; i <= countZ; i++) {
			System.out.print("0 ");
		}
		for(int i = 1; i <= n - countZ; i++) {
			System.out.print("1 ");
		}
	}
	public static void main (String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String nD = br.readLine();
		String nDArr[] = nD.split(" ");
		int n = Integer.parseInt(nDArr[0]);
		int arr[]= new int[n];
		String input = br.readLine();
		String sar[] = input.split(" ");
		for(int i = 0; i < n; i++){
			arr[i] = Integer.parseInt(sar[i]);
		}
		cal(arr, n);
}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?