How to find same unique in two different size arrays?
1 view (last 30 days)
Assuming we have two different array sizes with similar items in it. How to find number of common items in these arrays?
x=[1 22 22
3 8 19];
y=[22 10 19 35];
here answer must be 2, reffering to 22 and 19.
Any good ideas? And also, would that be possible to do it without using loop since actual data size is relatively big?