lca + persistent data structure (interval tree)