Marks :10
: 4 | : 2
You are given two lists of positive integers. Write an algorithm representing the number of elements in the two lists which are not common to both the lists.
Constraints :
1 <= n,m <= 100000
1 <= arr[i] <= 10^9
Example
Input
11
1 1 2 3 4 5 5 7 6 9 10
10
11 12 13 4 5 6 7 18 19 20
Output:
12
Explanation:
The numbers that are not common to both lists are [1, 1, 2, 3, 9, 10, 11, 12, 13, 18, 19, 20]
So, the output is 12.
The first line of the input consists of an integer - *listinput1_size*, representing the number of elements in the first list(N).
The second line consists of N space separated integers representing the first list of integers.
The third list of an integer - *listinput2_size*, representing the number of elements in the second list(M).
The last line consists of M space-separated integers representing the second list of positive integers.
Print a positive integer representing the count of elements that are not common to both the lists of integers.
11 1 1 2 3 4 5 5 7 6 9 10 10 11 12 13 4 5 6 7 18 19 20
12
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.