Problem title
Difficulty
Avg time to solve

Modular Exponentiation
Easy
15 mins
Overlapping Intervals
Easy
24 mins
First and Last Position of an element in Sorted Array
Easy
20 mins
Maximum of minimum for every window size
Hard
45 mins
Find Duplicates In Array
Easy
15 mins
Maximum sum of two non-overlapping subarrays of a given size
Moderate
15 mins
Encode The String
Easy
10 mins
Majority Element - II
Easy
10 mins
Patternify
Easy
--
Longest Subarray Zero Sum
Easy
15 mins
40

# Overlapping Intervals

Difficulty: EASY
Contributed By
Avg. time to solve
24 min

Problem Statement

#### You have been given the start and end times of 'N' intervals. Write a function to check if any two intervals overlap with each other.

##### Note :
``````If an interval ends at time T and another interval starts at the same time, they are not considered overlapping intervals.
``````
##### Input format :
``````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.
``````
##### Output Format :
``````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.
``````
##### Note :
``````You do not have to print anything. Just return the boolean value.
``````
##### Constraints :
``````1 <= T <= 10^2
0 <= N <= 10^5
0 <= Start[i] <= 10^15
1 <= End[i] <= 10^15

Time Limit: 1 sec
``````
##### Sample Input 1 :
``````1
3
1 2 3
2 3 4
``````
##### Sample Output 1 :
``````false
``````
##### Explanation For Sample Input 1:
``````Here, in given intervals [1, 2], [2, 3], [3, 4], there are no overlapping intervals present.
``````
##### Sample Input 2 :
``````2
1
100
200
2
2 1
3 4
``````
##### Sample Output 2 :
``````false
true
``````
Console