What Is The Fastest Way Of Getting Intersection Of Two Arrays
You may find this useful
java - How do I get the intersection between two arrays as a new array? - Stack Overflow
have a look.
1 Like
You can simply use merge algorithm of merge sort. You can read this for more clarification:
Note: It assumes that arrays are sorted.