Question: The code should be in python and that code should be run for all test cases You have been given two integer arrays/list(ARR1 and ARR2)

 The code should be in python and that code should be

The code should be in python and that code should be run for all test cases

You have been given two integer arrays/list(ARR1 and ARR2) of size N and M, respectively. You need to print their intersection; An intersection for this problem can be defined when both the arrays/lists contain a particular value or to put it in other words, when there is a common value that exists in both the arrays/lists. The first line contains an Integer 'l' which denotes the number of test cases or queries to be run. Then the test cases follow. First line of each test case or query contains an integer "N" representing the size of the first array/list Second line contains "N' single space separated integers representing the elements of the first the array/list. Third line contains an integer 'M' representing the size of the second array/list. Fourth line contains 'M' single space separated integers representing the elements of the second array.dist. Output format For each test case, print the intersection elements in a row, separated by a single space.) Output for every test case will be printed in a separate line. Sample Input 1 2 6 268543 4 234 22 10 10 10 Sample Output 1 : 243 10 Sample Input 2 : 1 4 26 12 5 12342 Sample Output 2 212

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!