

N = 3
A = [ 1, 2, 3 ]
B = [ 2, 1, 3 ]
Explanation :
One of the possible connections can be (1,2) and (3,3).
Another possible connection is (2,1) and (3,3).
Ninja cannot connect all 3 pairs (1,2) , (2,1) and (3,3) as the first 2 pairs cross each other.
So, the maximum connection is 2.
The first line contains an integer 'T' which denotes the number of test cases to be run. Then the test cases follow.
The first line of each test case contains an integer ‘N’.
The next line contains ‘N’ integers representing the elements of array ‘A’ which denotes the coordinates of the northern houses.
The next line contains ‘N’ integers representing the elements of array ‘B’ which denotes the coordinates of the southern houses.
For each test case, output an integer denoting the maximum connections of houses possible.
Print the output of each test case in a new line.
You don’t need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 5
1 <= N <= 10^5
1 <= A[i] <= 10^5
Time Limit: 1 sec
Approach :
Algorithm :
Algorithm :