4 subtopics · 14 problems
Segment Trees & Fenwick Trees
Point update + range query, lazy propagation, and BIT variants.
01Segment Tree — Point Update, Range Query
Point update, range query in O(log n).
2 medium2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 339DXenia and Bit Operations | medium | Solve |
| 1904BCollecting Game | medium | Solve |
| 1862EKolya and Movie Theatre | hard | Solve |
| 1837EPlayoff Fixing | hard | Solve |
02Segment Tree — Lazy Propagation
Range update + range query in O(log n) with lazy tags.
1 medium3 hard
| Problem | Difficulty | Link |
|---|---|---|
| 580CKefa and Park | medium | Solve |
| 380CSereja and Brackets | hard | Solve |
| 474EPillars | hard | Solve |
| 242EXOR on Segment | hard | Solve |
03Fenwick Tree (BIT)
Simpler alternative to segment tree for prefix sum + point update.
2 medium2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1843ETracking Segments | medium | Solve |
| 1579E2Array Optimization by Deque (hard) | medium | Solve |
| 1881EBlock Sequence | hard | Solve |
| 1904DSet To Max | hard | Solve |
04Merge Sort Tree
Segment tree where each node stores a sorted list — answer order-statistic range queries.
2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 474EPillars | hard | Solve |
| 785EAnton and Permutation | hard | Solve |
Was this helpful?