class Interval {
int start;
int end;
// int height;
Interval (int start, int end) {
this.start = start;
this.end = end;
}
}
其基本思想就是在众多可能的情况中,只考虑我需要用的值.
而且对于每个值的意义要明确定义。
离散方法:
separate segments, points.
most naive way: make each possible point a separate point.
optimize: only care about boundary points.
advanced data structure \/ algorithm.