Ninja is the manager of a restaurant. There were ‘N’ customers who visit the restaurant. Ninja is interested in calculating what was the maximum number of customers in the restaurant at a time. He finds this problem is tough for him, so he wants your help.
You are given the arrival and leaving time of ‘N’ customers in the form of arrays named ‘ARRIVAL’ and ‘LEAVING’. Your task is to find the maximum number of customers at any point in time.
Note :
All arrival and leaving times are distinct.
Input Format :
The first line contains an integer ‘T’, which denotes the number of test cases to be run. Then, the T test cases follow.
The first line of each test case contains a positive integer, ‘N’, denoting the total number of customers.
The next ‘N’ lines of each test case contain 2 integers, ‘x’, and ‘y’, denoting the arrival and leaving time of a customer.
Output Format :
For each test case, print the “maximum number of customers” in the restaurant at a time, as described in the problem statement.
Output for each test case will be printed in a separate line.
Note :
You do not need to print anything. It has already been taken care of. Just implement the given function.
Constraints :
1 <= ‘T’ <= 10
1 <= ‘N’ <= 10^4
1 <= ‘x’ < ‘y’ <= 10^6
Time Limit: 1 second