There are 2 arrays (Say A & B). Both of them having some similar elements. I need to put similar elements of A & B in to another array(say C) and the Elements which are in A but not not in B in to another array (say D).
eg.
Elements in A: a1,a2,p,q,
Elements in B: b1,b2,p,q
After process
Elements in C: p,q
Elements in D: a1,a2
What is the most efficient way to handle this?
Srinika