Segment trees: range queries with updates. Structure: Array-based binary tree.
Node has children and . Core Operations:
- Build from array:
- Point update:
- Range query:
Lazy Propagation: For range updates.
Mark nodes as "lazy" and push updates when needed. Common Uses: Range sum, min, max, GCD, count. Time: . Space: .