Feedback for AOCV207 problem

Learning course: C++ for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone

Feedback

//Update the ‘_’ in the code below to solve the problem

include <bits/stdc++.h>
using namespace std;

void freq(int A[],int N)
{
int i;
unordered_map<int,int>mp;
for( i=0;i<N;i++)
{
mp[A[i]]++;
}
for(auto x:mp)
{
cout<<x.first<<" ";
}
cout<<endl;

for(auto x:mp)
{
    cout<<x.second<<" ";
}
cout<<endl;

}

void sorting(int A[] ,int i, int N)
{
for(i=0;i<N;i++)
{
for(int j=i+1;j<N;j++)
{
if(A[i]<A[j])
{
swap(A[i],A[j]);
}
}
}

}

int main()
{
int t, N;
cin >> t;
while(t–)
{
cin>>N;
int A[N];
for(int i=0;i<N;i++)
{
cin>> A[i];
}
sorting(A,0,N);
freq(A,N);
}
return 0;
}
what’s the problem in it.