领英 店面

Lint口 思起思. BT - LCA (with parent pointer)
类似题: 利口伞舞儿,实现下面两个方法

public interface Ranges {
    void addRange(int from, int to) {
    }


    // 根据加入的range,返回覆盖的总长度。
    // 合并intersecting ranges。
    // e.g. [9,10][2,5][1,6], total length = 6    
    int getTotalLength() {
        }
    }