I would like to intersect of more than 2 arrays. Here's incomplete version of my coding :
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
int n;
cin >> n;
cout << "\n";
string rock[n];
for(int i=0;i<n;i++)
{
cin >> rock[i];
cout << "\n";
}
for(int i=0;i<n;i++)
sort(rock[i].begin(), rock[i].end());
}
So for example if I input
3
asasadfg
aassdw
dasaasf
I want it the output to be like this
ads
No duplication and intersect between more than 2 arrays. What's the best way to do it? Thanks