int findUnion(vector<int>& a, vector<int>& b) {
// code here
unordered_set<int> s(a.begin(), a.end());
for(int i=0; i<b.size(); i++) {
s.insert(b[i]);
}
return s.size();
}
Learn to Code and Code to Learn
Your Journey to Code Mastery
int findUnion(vector<int>& a, vector<int>& b) {
// code here
unordered_set<int> s(a.begin(), a.end());
for(int i=0; i<b.size(); i++) {
s.insert(b[i]);
}
return s.size();
}