← all tags

Tag: segment-tree

1 post

Euler Tour on Trees
DSA Flatten a tree into an array using DFS timestamps — subtree queries become range queries, and you can throw a segment tree at them.