Overview
A persistent segment tree supports range queries over historical versions while sharing unchanged subtrees between versions.
Keeps previous segment tree versions by copying only nodes along update paths.
Compact metadata for implementation and discovery.
A persistent segment tree supports range queries over historical versions while sharing unchanged subtrees between versions.
Quick facts
Runtime and memory behavior at a glance.
Best
O(log n)
Average
O(log n)
Worst
O(log n)
Space
O(log n) per update
new_nodes = O(log n)Only nodes on the root-to-leaf path need to be copied.
Show the structure layout and how operations move through or update it.
Persistent Segment Tree should be used with the assumptions and tradeoffs of persistent Data Structure in mind.
What each reference supports for this entry.
Reference for path-copying persistence used to preserve historical versions of segment-tree style structures.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Persistent segment trees retain historical versions of segment tree updates.