1. You will be given twp Arrays and their length.
2. You need to find their intersection and return those elements in a new array.
4. Return empty array if no intersecting element.
5. Input and output is handled for you
6. It is a functional problem ,please do not modify main()
NOTE:
Each element in the resultant array should appear as many times as it intersects in both arrays
The result can be in any order.
Input Format
Input is handled for you.
Output Format
Output is handled for you.
Constraints
1 <= N, M <= 10^5 1 <= A[i], B[i] <= 10^5
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
5 2 3 5 1 6 7 1 9 7 6 10 9 1
Output
1 6