```
class Solution:
# @param {Interval[]} intervals
# @return {integer}
def minMeetingRooms(self, intervals):
if len(intervals) < 2:
return len(intervals)
intervals.sort(key = lambda x: x.start)
rooms = [intervals[0]]
for i in xrange(1, len(intervals)):
flag = False
for r in rooms:
# use current room
if intervals[i].start >= r.end:
r.end = max(r.end, intervals[i].end)
flag = True
break
# need new room
if not flag:
rooms.append(intervals[i])
return len(rooms)
```