The idea is simple.

use a vector to keep every meetings room last time.

```
def minMeetingRooms(self, intervals):
intervals.sort(cmp = lambda x,y:x.end - y.end if x.end != y.end else x.start - y.start)
n = len(intervals)
if n <= 0:
return n
last = []
last.append(intervals[0].end)
for i in xrange(1,n):
j = len(last) - 1
while j >= 0 and intervals[i].start < last[j]:
j -= 1
if j >= 0:
last.pop(j)
last.append(intervals[i].end)
return len(last)
```