My issue
this code is equivalent to the usage of map data structure.
why it is giving wrong answer.
logic is correct to my knowledge.
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int arr[n];
int count[100002];
for(int i=0;i<n;i++){
cin>>arr[i];
count[arr[i]]++;
}
for(int i=0;i<100002;i++){
if(count[i]%2!=0){
cout<<i<<endl;
break;
}
}
}
return 0;
}
Problem Link: MISSP Problem - CodeChef