ended6월 3일· 1 sources
Decoding Segment Trees: How Binary Structures Solve Range Queries in O(log n) Time
세그먼트 트리: 범위 쿼리를 O(log n)에 처리하는 분할 정복의 힘
Why it matters
Segment trees are essential for efficiently handling range queries and point updates on arrays—a fundamental technique in competitive programming and technical interviews. By decomposing arbitrary ranges into logarithmically-sized precomputed intervals, they achieve O(log n) complexity per operation, dramatically outperforming O(n) brute-force approaches. This guide transforms segment trees from a mysterious black box into a clear, practical tool based on systematic divide-and-conquer logic.
1
Sources
+0
24h
—
Growth
7d
Active
Segment TreeRange sumInterval decompositionDivide-and-conquerQuery optimization