pretty straight forward.

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