```
class Solution {
private:
static bool comp (const Interval& a, const Interval& b) { return a.end <= b.start; }
public:
bool canAttendMeetings(vector<Interval>& intervals) {
sort(intervals.begin(), intervals.end(), comp);
for (int i = 1; i < intervals.size(); i++)
if (intervals[i - 1].end > intervals[i].start) { return false; }
return true;
}
};
```