Given two arrays A and B of equal size N, the task is to find a vector containing only those elements which belong to exactly one array - either A or B - but not both. That is, if some element x appears in both A and B it should not be included in the output vector. Complete the implementation of "getVector(vectorA, vectorB, int N)" function. Example: Input: 1 3 5 7 1 3 2 4 6 7 8 Output: 3 5 1 3 2 4 6 8 The driver codes are attached in the images below. DO NOT CHANGE THE PROVIDED DRIVER CODES AT ALL, LEAVE THEM EXACTLY THE SAME. ONLY ADD CODE TO THE "getVector(vectorA, vectorB, int N)" FUNCTION
Given two arrays A and B of equal size N, the task is to find a vector containing only those elements which belong to exactly one array - either A or B - but not both. That is, if some element x appears in both A and B it should not be included in the output vector. Complete the implementation of "getVector(vector<ll>A, vector<ll>B, int N)" function.
Example:
Input:
1
3 5 7 1 3
2 4 6 7 8
Output:
3 5 1 3 2 4 6 8
The driver codes are attached in the images below. DO NOT CHANGE THE PROVIDED DRIVER CODES AT ALL, LEAVE THEM EXACTLY THE SAME. ONLY ADD CODE TO THE "getVector(vector<ll>A, vector<ll>B, int N)" FUNCTION
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
This answer does not assist with the question, I am asking about the at() function. I understand and can complete the for loop.