Question: The third line consists M space separated integersdenot The input will be re The output consists of two lines: The first line consists space separted
The third line consists space separated integersdenot
The input will be re
The output consists of two lines:
The first line consists space separted elements of Intersection array.
The second line consists space separted elements of union array.
The output will be matched to the candidate's output printed on the STDOUT
Constraints:
arrarr
Example:
Input:
Output:
Explanation:
The intersection of arr and arr contains the elements that are common to both arroys, whilch is
The union of arr and arr contains all unique elements from both arrays, with duplicates removed, resilting
Sample input
Sample Output
Secure Exam Browser
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
