Segment Tree
A segment tree is a binary tree data structure that allows answering range queries and updating values in an array in logarithmic time.
A segment tree is a binary tree data structure that allows answering range queries and updating values in an array in logarithmic time.