import java.util.*; import java.io.*; class Solution{ public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt(); for(int i=0;i 0) { String input = br.readLine(); String[] inputArray = input.split("\\s+"); int a[] = new int[inputArray.length]; for (int i = 0; i < a.length; i++) a[i] = Integer.parseInt(inputArray[i]); Solution ob = new Solution(); ob.sort012(a); for (int num : a) { System.out.print(num + " "); } System.out.println(); System.out.println("~"); } } } // } Driver Code Ends class Solution { // Function to sort an array of 0s, 1s, and 2s public void sort012(int[] arr) { // code here int ones=0; int zeros=0; int twos=0; int n=arr.length; //6 for(int i=0;i