```
public class Solution {
public int minMeetingRooms(Interval[] intervals) {
Arrays.sort(intervals, new Comparator<Interval>(){
public int compare(Interval i1, Interval i2) {
return i1.start - i2.start;
}
});
int count = 0;
int[] visit = new int[intervals.length];
int ret = 0;
while (count < intervals.length) {
int max = -1;
ret ++;
for (int i = 0; i < intervals.length; i++) {
if (visit[i] == 0) {
if (max > intervals[i].start) {
continue;
} else {
visit[i] = 1;
count++;
max = Math.max(max, intervals[i].end);
}
}
}
}
return ret;
}
}
```