# Question

Formatted question description: https://leetcode.ca/all/252.html

```
252.Meeting Rooms
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei),
determine if a person could attend all meetings.
For example,
Given [[0, 30],[5, 10],[15, 20]],
return false.
@tag-interval
```

# Algorithm

To find whether there is an intersection of intervals, the easiest way is to compare every two intervals to see if there is an overlap. If so, just return false.

Compare whether there is overlap between the two intervals a and b, you can detect two cases,

- If the start position of a is greater than or equal to the start position of b, and the start position of a is less than the end position of b, there must be overlap,
- Another situation is that a and b exchange positions. If the start position of b is greater than or equal to the start position of a, and the start position of b is less than the end position of a, then there must be overlap

# Code

Java