Add final version of segment tree with lazy propagation