Segment Tree
A segment tree stores answers for ranges of an array. A range query and a point update each climb or cover O(log n) nodes.
Costs
| Category | Data Structure |
| Difficulty | Hard |
| Build | O(n) |
| Range query | O(log n) |
| Point update | O(log n) |
Questions
What is Segment Tree?
A segment tree stores answers for ranges of an array. A range query and a point update each climb or cover O(log n) nodes.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.