For this Question: Given an array A[] with N elements, your task is to sort it using counting sort algorithm.The first line of the input contains the number of test cases T. For each test case, the first line contains the number of elements N in the array A and the next line will contain the N elements (space separated) of A[].


Constraints:
1 <= T <= 12
1 <= N <= 100
1 <= A[] <= 100000
For each test case in a new line, you need to print the sorted array using counting sort.Sample Input:
3
4
8 1 3 7
3
1 3 7
6
6 1 3 7 4 9

Sample Output:
1 3 8 7
1 3 7
1 3 4 6 7 9, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];}
sort(a,a+n);
for(int i=0;i<n;i++){
cout<<a[i]<<" ";}
cout<<endl;}}, In this Programming Language: C++, Now tell me if this Code is compilable or not?