- Segment tree is an advanced binary tree based data structure which allows querying in log time.
- General representation of segment tree
- Leaf node represents the actual values.
- Intermediate node represents a transformed value of its children. Example – sum, range.
- References
- Wiki link on segment tree.
- Another good read on segment tree.