Data Structures19 sections · 729 units
Open in Course

Quiz: Segment Trees

Test your understanding

Segment Tree Concepts

Why does lazy propagation achieve O(log n) for range updates instead of O(n)?

  1. A.It stops recursion early when a node's range is completely inside the update range, marking it as 'lazy' instead of updating all descendants
  2. B.It uses a different tree structure with fewer nodes
  3. C.It compresses the range into a single value
  4. D.It skips nodes that have value zero
Start the roadmap to answer the quizzes and solve the challenges