


If an interval ends at time T and another interval starts at the same time, they are not considered overlapping intervals.
The first line contains an Integer 'T' which denotes the number of test cases or queries to be run. Then the test cases follow.
The first line of each test case or query contains an integer 'N' representing the total number of intervals.
The second line contains 'N' single space-separated integers representing the starting time of the intervals.
The third line contains 'N' single space-separated integers representing the end time of the intervals.
For each test case, return true if overlapping intervals are present. Otherwise, return false.
Output for every test case will be printed in a separate line.
You do not have to print anything. Just return the boolean value.
1 <= T <= 10^2
0 <= N <= 10^5
0 <= Start[i] <= 10^15
1 <= End[i] <= 10^15
Time Limit: 1 sec
Iterate over the intervals one by one.
For every interval, check if there is an overlap with any of the remaining intervals then we stop execution
Sort the list of intervals first on the basis of their start time and then iterate through the array
If the start time of an interval is less than the end of the previous interval, then there is an overlap and we can return true.
If we iterate through the entire array without finding an overlap, we can return false
There is an alternative approach also possible in which we:
This would work with a complexity of O(N + maxElement). But, this would not work for values greater than 10^8, hence this is not feasible here.