Segment tree with lazy propagation
A Segment Tree is an efficient and flexible data structure that is used to solve range queries while handling updates at the same time. The lazy Propagation technique is used in a segment tree to solve range queries in O(log n) time complexity. In lazy propagation, we make copy nodes for each node in the ...