hey folks , can somone tell whats wrong with this approach
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int n ;
string str;
cin>>n;
cin.ignore();
getline(cin,str);
int *ar = new int[26];
bool *visited = new bool[26];
for(int i =0;i<26;i++){
ar[i]=0;
visited[i]=false;
};
for(int i =0;i<n;i++){
ar[str[i]-'a']++;
}
int c = 0;
for(int i =0;i<n;i++){
if(!visited[str[i]-'a'] && ar[str[i]-'a']%2==0){
visited[str[i]-'a']=true;
c+=ar[str[i]-'a'];
}
}
if(c==n){
cout<<"Yes\n";
}else{
cout<<"No\n";
}
}
return 0;
}