Blog

From Tree to Segment Tree

, competitive programming

A segment tree over eight elements, with the three nodes that answer query(2, 6) highlighted.

Placeholder. This post is being written.

Planned outline:

  • Trees: representation, traversal, complete binary trees in an array
  • Segment trees: build, point update, range query in O(log n)
  • Beyond: lazy propagation and the problems that need it