My idea is a little like https://discuss.leetcode.com/topic/35253/explanation-of-super-easy-java-solution-beats-98-8-from-pinkfloyda

and this one https://discuss.leetcode.com/topic/20971/c-o-n-log-n-584-ms-3-solutions

but there are some difficult , I insert the begin as positive number and end as negative number, then sort it by abs, then start with 0, meet a positive ,plus 1, meet a negative , minus 1，and get the max;

the code is like

```
class Solution {
public:
int minMeetingRooms(vector<Interval>& intervals) {
if (intervals.size() <= 0)
return 0;
auto cmp = [](int a, int b)->bool{
if (abs(a) == abs(b)){
return a < b;
}
return abs(a) < abs(b);
};
vector<int> all;
for (auto i : intervals){
all.push_back(i.start);
all.push_back(-i.end);
}
sort(all.begin(), all.end(),cmp);
int now = 0;
int out = 1;
for (auto i : all){
if (i >= 0)
++now;
else
--now;
out = max(out, now);
}
return out;
}
};
```